Skip to content
Example rails app using fakeweb to return known responses in culerity
Ruby JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
config
db
doc
features
lib/tasks
log
public
script
spec
tmp
vendor/plugins
.gitignore
README.textile
Rakefile

README.textile

Culerity with fakeweb

Florida is fucking cold?

This example app uses fakeweb to return an erroneous weather
report for Jacksonville, FL. The cucumber feature called “weather”
asserts that Jacksonville, FL is “fucking cold,” which we all
know is rarely true. When the test runs, fakeweb intercepts the
request for Jacksonville weather and instead returns the New York
weather report, which is unfailingly “fucking cold.”

Instructions

  1. sudo script/server -p 80 -e cucumber
  2. cucumber features/weather.feature
  3. The test passes!
  4. read the code

Make it fail

  1. edit config/environments/cucumber.rb
  2. comment out the fakeweb uri registration
  3. restart the server (see above)
  4. cucumber features/weather.feature
  5. test fails
Something went wrong with that request. Please try again.