This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree 5 files changed +34
-2
lines changed
5 files changed +34
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ group :test do
14
14
gem 'cucumber'
15
15
gem 'capybara'
16
16
gem 'capybara-webkit'
17
+ gem 'launchy'
17
18
end
18
19
19
20
group :development , :test do
Original file line number Diff line number Diff line change 29
29
childprocess (0.2.1 )
30
30
ffi (~> 1.0.6 )
31
31
columnize (0.3.4 )
32
+ configuration (1.3.1 )
32
33
cucumber (1.0.2 )
33
34
builder (>= 2.1.2 )
34
35
diff-lcs (>= 1.1.2 )
47
48
i18n (0.5.0 )
48
49
json (1.5.3 )
49
50
json_pure (1.5.3 )
51
+ launchy (0.4.0 )
52
+ configuration (>= 0.0.5 )
53
+ rake (>= 0.8.1 )
50
54
linecache (0.46 )
51
55
rbx-require-relative (> 0.0.4 )
52
56
linecache19 (0.5.12 )
@@ -115,6 +119,7 @@ DEPENDENCIES
115
119
capybara-webkit
116
120
cucumber
117
121
factory_girl
122
+ launchy
118
123
rack-test
119
124
rake
120
125
rspec
Original file line number Diff line number Diff line change @@ -9,3 +9,19 @@ Feature: Stories
9
9
10
10
When I go to the home page
11
11
Then I should see "Set up integration tests"
12
+
13
+ Scenario : Updating a story
14
+ Given the following story exists:
15
+ | description |
16
+ | Updating a story |
17
+ When I go to the home page
18
+ And I follow "Edit" within the story "Updating a story"
19
+ And I fill in "description" with "User can update a story" within the story "Updating a story"
20
+ And I press "Update" within the story "Updating a story"
21
+
22
+ Then I should see "User can update a story"
23
+ And I should not see "Updating a story"
24
+
25
+ When I go to the home page
26
+ Then I should see "User can update a story"
27
+ And I should not see "Updating a story"
Original file line number Diff line number Diff line change 3
3
require 'bundler'
4
4
Bundler . require :default , 'test'
5
5
require 'gaskit'
6
+
6
7
require 'factories'
8
+ require 'factory_girl/step_definitions'
7
9
8
10
require 'capybara/cucumber'
9
11
Capybara . default_selector = :css
10
- Capybara . app = Gaskit ::App . new
11
- Capybara . javascript_driver = :webkit
12
+ Capybara . app = Rack ::Builder . new do
13
+ map ( '/assets' ) { run Gaskit ::App . sprockets }
14
+ map ( '/' ) { run Gaskit ::App }
15
+ end
16
+ Capybara . asset_root = Gaskit . root . join ( 'public' )
17
+ Capybara . save_and_open_page_path = Gaskit . root . join ( 'tmp/capybara' )
18
+ Capybara . javascript_driver = ENV [ 'SELENIUM' ] ? :selenium : :webkit
12
19
13
20
Before do
14
21
Gaskit ::Story . store . clear
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ def selector_for(locator)
10
10
11
11
when "the page"
12
12
"html > body"
13
+ when /^the story "(.+)"$/
14
+ story = Gaskit ::Story . all . detect { |s | s . description == $1 } || raise ( "Could not find story: #{ $1} " )
15
+ "#story-#{ story . id } "
13
16
14
17
# Add more mappings here.
15
18
# Here is an example that pulls values out of the Regexp:
You can’t perform that action at this time.
0 commit comments