Skip to content

Commit

Permalink
Add spinach features
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturT committed Jun 3, 2016
1 parent a4bbfc6 commit 619ea30
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ group :test do
gem 'cucumber-rails', :require => false
# database_cleaner is not required, but highly recommended
gem 'database_cleaner'

gem 'spinach'
end

9 changes: 8 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.10.0)
colorize (0.7.7)
concurrent-ruby (1.0.1)
cucumber (2.3.3)
builder (>= 2.1.2)
Expand All @@ -88,6 +89,7 @@ GEM
erubis (2.7.0)
execjs (2.6.0)
gherkin (3.2.0)
gherkin-ruby (0.3.2)
globalid (0.3.6)
activesupport (>= 4.1.0)
i18n (0.7.0)
Expand All @@ -109,7 +111,7 @@ GEM
mime-types-data (3.2016.0221)
mini_portile2 (2.0.0)
minitest (5.8.4)
multi_json (1.11.2)
multi_json (1.12.1)
multi_test (0.1.2)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
Expand Down Expand Up @@ -175,6 +177,10 @@ GEM
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
slop (3.6.0)
spinach (0.8.10)
colorize
gherkin-ruby (>= 0.3.2)
json
spring (1.7.1)
sprockets (3.6.0)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -218,6 +224,7 @@ DEPENDENCIES
rspec-rails
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
spinach
spring
sqlite3
turbolinks
Expand Down
4 changes: 4 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ test:
#- KNAPSACK_GENERATE_REPORT=true bundle exec rake test
- bundle exec rake knapsack:minitest[--verbose]:
parallel: true

# KNAPSACK_GENERATE_REPORT=true bundle exec spinach -f spinach_features
- KNAPSACK_TEST_FILE_PATTERN="spinach_features/**{,/*/**}/*.feature" bundle exec rake "knapsack:spinach[-f spinach_features]":
parallel: true
4 changes: 4 additions & 0 deletions knapsack_spinach_report.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"spinach_features/scenario1.feature": 0.0019788742065429688,
"spinach_features/scenario2.feature": 0.0014770030975341797
}
6 changes: 6 additions & 0 deletions spinach_features/scenario1.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Feature: Test how spinach works for first test
Scenario: Format greeting
Given I have an empty array
And I append my first name and my last name to it
When I pass it to my super-duper method
Then the output should contain a formal greeting
6 changes: 6 additions & 0 deletions spinach_features/scenario2.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Feature: Test how spinach works for second test
Scenario: Informal greeting
Given I have an empty array
And I append only my first name to it
When I pass it to my super-duper method
Then the output should contain a casual greeting
6 changes: 6 additions & 0 deletions spinach_features/scenario3_leftover.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Feature: Test how spinach works for second test
Scenario: Informal greeting
Given I have an empty array
And I append only my first name to it
When I pass it to my super-duper method
Then the output should contain a casual greeting
13 changes: 13 additions & 0 deletions spinach_features/steps/test_how_spinach_works_for_first_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class Spinach::Features::TestHowSpinachWorksForFirstTest < Spinach::FeatureSteps
step 'I have an empty array' do
end

step 'I append my first name and my last name to it' do
end

step 'I pass it to my super-duper method' do
end

step 'the output should contain a formal greeting' do
end
end
13 changes: 13 additions & 0 deletions spinach_features/steps/test_how_spinach_works_for_second_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class Spinach::Features::TestHowSpinachWorksForSecondTest < Spinach::FeatureSteps
step 'I have an empty array' do
end

step 'I append only my first name to it' do
end

step 'I pass it to my super-duper method' do
end

step 'the output should contain a casual greeting' do
end
end
3 changes: 3 additions & 0 deletions spinach_features/support/env.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require 'knapsack'

Knapsack::Adapters::SpinachAdapter.bind

0 comments on commit 619ea30

Please sign in to comment.