Skip to content

Instantly share code, notes, and snippets.

View onethirtyfive's full-sized avatar

Joshua Morris onethirtyfive

View GitHub Profile
test: for #content_tag method should support tags with haml. (TestTagHelpers) [test/test_tag_helpers.rb:52]:
expected following output to contain a <p class='test' id='test1'>Test 1</p> tag:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<style type="text/css">
body { text-align:center;font-family:helvetica,arial;font-size:22px;
color:#888;margin:20px}
#c {margin:0 auto;width:500px;text-align:left}
a typical, if short Rails 3.0 'rake routes' output for a resource defined in routes with 'resources :posts'
[22:15][me@localhost:rails_project(master)]$ rake routes
(in /home/me/Code/rails_project)
GET /posts(.:format) {:controller=>"posts", :action=>"index"}
posts POST /posts(.:format) {:controller=>"posts", :action=>"create"}
new_post GET /posts/new(.:format) {:controller=>"posts", :action=>"new"}
GET /posts/:id(.:format) {:controller=>"posts", :action=>"show"}
PUT /posts/:id(.:format) {:controller=>"posts", :action=>"update"}
post DELETE /posts/:id(.:format) {:controller=>"posts", :action=>"destroy"}
Error:
Scenario: Visiting landing page # features/landing.feature:5
Given I am on the landing page # features/step_definitions/web_steps.rb:15
undefined method `visit' for #<Cucumber::Rails::World:0x63cc072> (NoMethodError)
./features/step_definitions/web_steps.rb:15:in `/^(?:|I )am on (.+)$/'
features/landing.feature:6:in `Given I am on the landing page'
Then I should see a welcome message # features/landing.feature:7
From features/support/env.rb: