flowerbox/features/basic_run.feature

53 lines
1.3 KiB
Gherkin
Raw Permalink Normal View History

2012-02-22 16:47:07 +00:00
Feature: Basic Run
2012-02-23 21:12:00 +00:00
Background:
2012-02-22 16:47:07 +00:00
Given I have the file "spec/javascripts/cat_spec.js.coffee" with the content:
"""
#= require cat
describe 'Cat', ->
describe '#meow', ->
it 'should meow', ->
cat = new Cat()
expect(cat.meow()).toEqual('meow')
"""
Given I have the file "lib/cat.js.coffee" with the content:
"""
2012-03-24 14:17:33 +00:00
class @Cat
2012-02-22 16:47:07 +00:00
meow: -> "meow"
"""
2012-02-23 21:12:00 +00:00
Scenario: Use the Node runner using Jasmine
Given I have the file "spec/javascripts/spec_helper.rb" with the content:
"""
Flowerbox.configure do |c|
c.test_with :jasmine
c.run_with :node
c.spec_patterns << "**/*_spec.*"
c.asset_paths << "lib"
2012-03-24 14:17:33 +00:00
c.reporters << :json
2012-02-23 21:12:00 +00:00
end
"""
When I run Flowerbox with "spec/javascripts"
Then I should have 1 test and 0 failures
2012-03-24 14:17:33 +00:00
@wip
2012-02-23 21:12:00 +00:00
Scenario: Use the Selenium runner using Jasmine
Given I have the file "spec/javascripts/spec_helper.rb" with the content:
"""
Flowerbox.configure do |c|
c.test_with :jasmine
2012-03-24 14:17:33 +00:00
c.run_with :chrome
2012-02-23 21:12:00 +00:00
c.spec_patterns << "**/*_spec.*"
c.asset_paths << "lib"
2012-03-24 14:17:33 +00:00
c.reporters << :json
2012-02-23 21:12:00 +00:00
end
"""
2012-02-22 16:47:07 +00:00
When I run Flowerbox with "spec/javascripts"
Then I should have 1 test and 0 failures