-
Open your project (if you're using WebPack, obviously)
-
npm install sinon --save-dev
-
You should now have Sinon in your node modules and listed in your
package.json
file -
In your tests, require Sinon:
var sinon = require('sinon');
development and test gems | |
---------------------------------------------- | |
group :development, :test do | |
gem 'sqlite3' | |
gem 'rspec-rails' | |
gem "capybara" | |
gem 'selenium-webdriver' | |
gem 'shoulda-matchers' | |
gem 'launchy' |
This is an excellent post that explains a little bit behind the difficulty in testing external services https://robots.thoughtbot.com/how-to-stub-external-services-in-tests How to Stub External Services in Tests
One simple option is to use Webmock
Here is an example of using Webmock in a similar way to what VCR does - which is recording and reading from a file
stub_request(:any, "www.example.com").
When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.
Read Node.js, Require and Exports and Organize Your Code with RequireJS
- In the context of Node, what is a
module
? - The code examples from the second blog post look very different from the first. Why?
- The History
- Why does it exist?
- Bike Shedding/LookingFor
- Do we have to use it?
Meeka @ccanduc
##PROTIP: README Love
READMEs are AWESOME. They are one of the best things you can add to a repo, (other than quality code), to make it look professional.
####Things that make a README great:
- A link to the production site on heroku
- A screenshot (or a few) of what the app does (This is especially important if you don't have the production app up and running yet)
- Directions on how to clone or fork the repo and run it locally (explain it like you're explaining things to a totally new programmer)
I hereby claim:
- I am rrgayhart on github.
- I am rrgayhart (https://keybase.io/rrgayhart) on keybase.
- I have a public key ASCMU9dJV7wzOm_Gmhn5jRqRXCtseZwBX7vW7IBatkYb8go
To claim this, I am signing this object:
# poll.js
def self.check_name(string)
array = normal.select do |ingredient|
string.downcase.include?(ingredient.downcase.pluralize) ||
string.downcase.include?(ingredient.downcase)
end
if array.any?
array.first
Put emails in the #refactor-track-tor channel for Harvest accounts