Created
August 1, 2011 18:38
-
-
Save austinbv/1118724 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ rspec spec/controllers/test_spec.rb | |
| You no longer need to have jasmine.rake in your project, as it is now automatically loaded | |
| from the Jasmine gem. To silence this warning, set "USE_JASMINE_RAKE=true" in your environment | |
| or remove jasmine.rake. | |
| F | |
| Failures: | |
| 1) presentation/index.html.erb should vist presentations path | |
| Failure/Error: visit(root_path) | |
| NameError: | |
| undefined local variable or method `root_path' for #<RSpec::Core::ExampleGroup::Nested_1:0x00000104930058> | |
| # ./spec/controllers/test_spec.rb:5:in `block (2 levels) in <top (required)>' | |
| Finished in 0.09903 seconds | |
| 1 example, 1 failure | |
| Failed examples: | |
| rspec ./spec/controllers/test_spec.rb:4 # presentation/index.html.erb should vist presentations path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| presentations GET /presentations(.:format) {:action=>"index", :controller=>"presentations"} | |
| POST /presentations(.:format) {:action=>"create", :controller=>"presentations"} | |
| new_presentation GET /presentations/new(.:format) {:action=>"new", :controller=>"presentations"} | |
| edit_presentation GET /presentations/:id/edit(.:format) {:action=>"edit", :controller=>"presentations"} | |
| presentation GET /presentations/:id(.:format) {:action=>"show", :controller=>"presentations"} | |
| PUT /presentations/:id(.:format) {:action=>"update", :controller=>"presentations"} | |
| DELETE /presentations/:id(.:format) {:action=>"destroy", :controller=>"presentations"} | |
| root / {:controller=>"presentation", :action=>"index"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file is copied to spec/ when you run 'rails generate rspec:install' | |
| ENV["RAILS_ENV"] ||= 'test' | |
| require File.expand_path("../../config/environment", __FILE__) | |
| require 'rspec/rails' | |
| require 'capybara/rails' | |
| # Requires supporting ruby files with custom matchers and macros, etc, | |
| # in spec/support/ and its subdirectories. | |
| Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} | |
| RSpec.configure do |config| | |
| # == Mock Framework | |
| # | |
| # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line: | |
| # | |
| # config.mock_with :mocha | |
| # config.mock_with :flexmock | |
| # config.mock_with :rr | |
| config.mock_with :rspec | |
| # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures | |
| config.fixture_path = "#{::Rails.root}/spec/fixtures" | |
| # If you're not using ActiveRecord, or you'd prefer not to run each of your | |
| # examples within a transaction, remove the following line or assign false | |
| # instead of true. | |
| config.use_transactional_fixtures = false | |
| config.before(:suite) do | |
| DatabaseCleaner.strategy = :truncation | |
| end | |
| config.before(:each) do | |
| DatabaseCleaner.start | |
| end | |
| config.after(:each) do | |
| DatabaseCleaner.clean | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'spec_helper' | |
| describe "presentation/index.html.erb" do | |
| it "should vist presentations path" do | |
| visit(root_path) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment