...api.chucknorris.io/jokes/random') res = Net::HTTP.get_response(uri) expect(res.body).to include('Paul') end end rspec spec/chuck_norris_spec.rb . Finished in 0.00759 seconds (files took 0.49565 seconds to load) 1 example, 0 failures
See the test failing Run the test to see it fail bundle exec rspec F Failures: 1) File "/entrypoint.sh" is expected to exist Failure/Error: it { should exist} expected File...
...seconds (files took 0.31723 seconds to load) 1 example, 1 failure Failed examples: rspec ./spec/dockerfile_spec.rb:10 # File "/entrypoint.sh" is expected to exist Fix the test entrypoint.sh #!/bin/sh Dockerfile
Best results in other decks
...Remove default rules BrowserConsole.ignore_nothing # Add your own rules BrowserConsole.ignore(...) BrowserConsole.ignore(...) Automatic checking in RSpec feature specs In your spec_helper.rb you may configure to automatically check for errors after every...
...A compromise might be to only check the console when the spec has ended: RSpec.configure do |config| config.after do BrowserConsole.assert_no_errors! end end Ignoring JavaScript errors for a spec...
Add in Gemfile: group :development, :test do gem 'rspec-rails' gem 'spork-rails' end group :test do gem 'capybara' gem 'database_cleaner' gem 'email_spec' gem 'poltergeist' gem 'launchy'
...controllers will be inferred # automatically. This will be the default behavior in future versions of # rspec-rails. config.infer_base_class_for_anonymous_controllers = true # Run specs in random order to...