Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## console
- [dfr@beta bigmac.git]$ ps -e | grep mong
- [dfr@beta bigmac.git]$ ls tmp/pids/
- [dfr@beta bigmac.git]$ rcuke features/blog/posts.feature -s "Should be able to create a post with a newly created category"
- Feature: Creating posts
- In order to provide basic blog functionality, admin users should be able to add and edit blog posts.
- Background: # features/blog/posts.feature:4
- Given admin@example.com is an admin with password "secret" # features/step_definitions/user_steps.rb:1
- ==> Waiting for rails application server on port 4567... Ready!
- Given I log in as admin@example.com with password "secret" # features/step_definitions/user_steps.rb:9
- Connection refused - connect(2) (Errno::ECONNREFUSED)
- /usr/local/lib/ruby/1.8/net/http.rb:560:in `initialize'
- /usr/local/lib/ruby/1.8/net/http.rb:560:in `open'
- /usr/local/lib/ruby/1.8/net/http.rb:560:in `original_net_http_connect'
- /usr/local/lib/ruby/1.8/timeout.rb:62:in `timeout'
- /usr/local/lib/ruby/1.8/timeout.rb:93:in `timeout'
- /usr/local/lib/ruby/1.8/net/http.rb:560:in `original_net_http_connect'
- /usr/local/lib/ruby/1.8/net/http.rb:845:in `post'
- /usr/local/lib/ruby/1.8/timeout.rb:62:in `timeout'
- /usr/local/lib/ruby/1.8/timeout.rb:93:in `timeout'
- (eval):2:in `/^I log in as (\S+) with password "([^"]+)"$/'
- features/blog/posts.feature:6:in `Given I log in as admin@example.com with password "secret"'
- Scenario: Should be able to create a post with a newly created category # features/blog/posts.feature:16
- Given I am creating a blog post # features/step_definitions/blog_steps.rb:16
- When I fill in "blog_post_title" with "Awesome post" # features/step_definitions/webrat_steps.rb:22
- And I fill in "blog_post_body" with "This is an awesome post!!!" # features/step_definitions/webrat_steps.rb:22
- And I click "Add category" # features/step_definitions/webrat_steps.rb:18
- And I fill in "category_name" with "Greatest posts ever" # features/step_definitions/webrat_steps.rb:22
- And I press "Add" # features/step_definitions/webrat_steps.rb:14
- And I press "Done" # features/step_definitions/webrat_steps.rb:14
- Then I should see Awesome post blog post # features/step_definitions/blog_steps.rb:21
- And blog category "Greated posts ever" should exist # features/blog/posts.feature:25
- And blog post "Awesome post" should belong to "Greated posts ever" category # features/blog/posts.feature:26
- 1 scenario
- 1 failed step
- 8 skipped steps
- 2 undefined steps
- 1 passed step
- You can implement step definitions for missing steps with these snippets:
- Then /^blog category "([^\"]*)" should exist$/ do |arg1|
- pending
- end
- Then /^blog post "([^\"]*)" should belong to "([^\"]*)" category$/ do |arg1, arg2|
- pending
- end
- !!! PID file /home/dfr/webitects/bigmac.git/tmp/pids/mongrel_selenium.pid does not exist. Not running?
- mongrel::stop reported an error. Use mongrel_rails mongrel::stop -h to get help.
- [dfr@beta bigmac.git]$
- ## features/support/env.rb
- # Sets up the Rails environment for Cucumber
- ENV["RAILS_ENV"] ||= "test"
- require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
- require 'cucumber/rails/world'
- require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support
- Cucumber::Rails.use_transactional_fixtures
- Cucumber::Rails.bypass_rescue # Comment out this line if you want Rails own error handling
- # (e.g. rescue_action_in_public / rescue_responses / rescue_from)
- require 'webrat'
- Webrat.configure do |config|
- config.mode = :selenium
- config.application_address = '10.2.148.109'
- config.application_port = 4567
- config.selenium_server_address = '10.2.148.109'
- end
- # require 'cucumber/rails/rspec'
- require 'webrat/core/matchers'
- require 'test/test_helper'
Add Comment
Please, Sign In to add comment