Sha256: ad4b0db1db5ec4e6d086a182e535c32516fb8665675962249fc668164fbd18fc

Contents?: true

Size: 923 Bytes

Versions: 5

Compression:

Stored size: 923 Bytes

Contents

Feature: controller spec

  Scenario: simple passing example
    Given a file named "spec/controllers/widgets_controller_spec.rb" with:
      """ruby
      require "spec_helper"

      describe WidgetsController do
        describe "GET index" do
          it "has a 200 status code" do
            get :index
            expect(response.code).to eq("200")
          end
        end
      end
      """
    When I run `rspec spec`
    Then the example should pass

  Scenario: controller is exposed to global before hooks
    Given a file named "spec/controllers/widgets_controller_spec.rb" with:
      """ruby
      require "spec_helper"

      RSpec.configure {|c| c.before { expect(controller).not_to be_nil }}

      describe WidgetsController do
        describe "GET index" do
          it "doesn't matter" do
          end
        end
      end
      """
    When I run `rspec spec`
    Then the example should pass

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-rails-2.13.0/features/controller_specs/controller_spec.feature
rspec-rails-2.13.0 features/controller_specs/controller_spec.feature
rspec-rails-2.12.2 features/controller_specs/controller_spec.feature
rspec-rails-2.12.1 features/controller_specs/controller_spec.feature
rspec-rails-2.12.0 features/controller_specs/controller_spec.feature