Skip to content

Commit d23ef71

Browse files
committed
Fixed Cucumber so that it actually works
It turns out that the generated file from cucumber-sinatra didn't actually work really well, so when we wrote our first feature, it broke. We fixed it, but didn't implement the first feature.
1 parent 2857198 commit d23ef71

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

features/homepage.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Feature: Homepage looks correct
2+
Scenario: We should see a download link
3+
Given I go to the homepage
4+
Then I should see "Download Hackety"

features/support/env.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Generated by cucumber-sinatra. (Sat Jul 10 15:46:03 -0400 2010)
22

3-
require File.join(File.dirname(__FILE__), '..', '..', 'hackety.rb')
3+
app_file = File.join(File.dirname(__FILE__), '..', '..', 'hackety.rb')
4+
require app_file
45

56
require 'capybara'
67
require 'capybara/cucumber'
78
require 'spec'
89

9-
Hackety.set(:environment, :test)
10+
Sinatra::Application.app_file = app_file
1011

1112
World do
12-
Capybara.app = Hackety
13+
Capybara.app = Sinatra::Application
14+
Capybara.app.set(:environment, :test)
1315
include Capybara
1416
include Spec::Expectations
1517
include Spec::Matchers

0 commit comments

Comments
 (0)