I added gem 'jasmine', '~> 2.0.0'
in my Gemfile
(group :development, :test
) and ran the generator rails g jasmine:install
.
I have one simple spec:
# spec/javascripts/truth_spec.js
describe("Truth", function() {
it("herps the derps", function() {
expect(true).toEqual(true);
});
});
When I run rake jasmine
I get presumably normal output:
your server is running here: http://localhost:8888/
your tests are here: /Users/jared/git/givegab/spec/javascripts
your source files are here: /Users/jared/git/givegab
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:8888, CTRL+C to stop
I open http://localhost:8888/
in my browser and I get a blank grey screen. My JS console is empty, no errors, and when I trace execution using a debugger I can step through boot.js
and jasmine.js
. No errors are raised.
I can set a debugger breakpoint in truth_spec.js
and it never gets hit.
This is my first time using jasmine, so please assume I am missing something obvious.
If jasmine is setup correctly, then opening http://localhost:8888/jasmine
in your browser should run all of your specs.
You can also run specific specs with:
http://localhost:8888/jasmine?spec=herps the derps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With