group :test, :development do
gem 'teaspoon-mocha'
end
Then ran bundle followed by the installation generator:
✗ rails generate teaspoon:install --coffee
create spec/teaspoon_env.rb
create spec/javascripts/support
create spec/javascripts/fixtures
create spec/javascripts/spec_helper.coffee
+============================================================================+
Congratulations! Teaspoon was successfully installed. Documentation and more
can be found at: https://github.com/modeset/teaspoon
I then created spec/javascripts/test_spec.js.coffee with the following content:
describe "My great feature", ->
it "will change the world", ->
expect(true).to.be(true)
it "will destroy the world", ->
expect(true).to.be(false)
Then tried to run the tests:
✗ rake teaspoon
Starting the Teaspoon server...
Teaspoon running default suite at http://127.0.0.1:65447/teaspoon/default
FF
Failures:
1) My great feature will change the world
Failure/Error: Can't find variable: expect
2) My great feature will destroy the world
Failure/Error: Can't find variable: expect
Finished in 0.01000 seconds
2 examples, 2 failures
Failed examples:
teaspoon -s default --filter="My great feature will change the world"
teaspoon -s default --filter="My great feature will destroy the world"
rake teaspoon failed
Added this to
Gemfile
:Then ran
bundle
followed by the installation generator:I then created
spec/javascripts/test_spec.js.coffee
with the following content:Then tried to run the tests:
Nothing else has changed. Running OS X 10.11.1.