Sha256: 8df2ff2c6c27dd53cf2305dce6618136721b97f5432b822fc510dbfcd7c7f095

Contents?: true

Size: 1.56 KB

Versions: 32

Compression:

Stored size: 1.56 KB

Contents

Feature: rake task
  
  RSpec ships with a rake task with a number of useful options

  Scenario: default options with passing spec (prints command and exit status is 0)
    Given a file named "Rakefile" with:
      """
      require 'rspec/core/rake_task'

      RSpec::Core::RakeTask.new(:spec)

      task :default => :spec
      """
    And a file named "spec/thing_spec.rb" with:
      """
      describe "something" do
        it "does something" do
          # pass
        end
      end
      """
    When I run "rake"
    Then the stderr should contain "ruby -S rspec"
    Then the exit status should be 0

  Scenario: default options with failing spec (exit status is 1)
    Given a file named "Rakefile" with:
      """
      require 'rspec/core/rake_task'

      RSpec::Core::RakeTask.new(:spec)

      task :default => :spec
      """
    And a file named "spec/thing_spec.rb" with:
      """
      describe "something" do
        it "does something" do
          fail
        end
      end
      """
    When I run "rake"
    Then the exit status should be 1
      
  Scenario: fail_on_error = false with failing spec (exit status is 0)
    Given a file named "Rakefile" with:
      """
      require 'rspec/core/rake_task'

      RSpec::Core::RakeTask.new(:spec) do |t|
        t.fail_on_error = false
      end

      task :default => :spec
      """
    And a file named "spec/thing_spec.rb" with:
      """
      describe "something" do
        it "does something" do
          fail
        end
      end
      """
    When I run "rake"
    Then the exit status should be 0
      

Version data entries

32 entries across 32 versions & 4 rubygems

Version Path
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rspec-core-2.5.1/features/command_line/rake_task.feature
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rspec-core-2.5.1/features/command_line/rake_task.feature
rspec-core-2.5.2 features/command_line/rake_task.feature
rspec-core-2.5.1 features/command_line/rake_task.feature
rspec-core-2.5.0 features/command_line/rake_task.feature
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/rake_task.feature
rspec-core-2.4.0 features/command_line/rake_task.feature
vim-jar-0.1.2 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/rake_task.feature
vim-jar-0.1.1 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/rake_task.feature
vim-jar-0.1.0 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/rake_task.feature
rspec-core-2.3.1 features/command_line/rake_task.feature
rspec-core-2.3.0 features/command_line/rake_task.feature
vim-jar-0.0.3 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/rake_task.feature
rspec-core-2.2.1 features/command_line/rake_task.feature
vim-jar-0.0.2 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/rake_task.feature
vim-jar-0.0.1 bundler/ruby/1.8/gems/rspec-core-2.1.0/features/command_line/rake_task.feature
rspec-core-2.2.0 features/command_line/rake_task.feature
rspec-core-2.1.0 features/command_line/rake_task.feature
rspec-core-2.0.1 features/command_line/rake_task.feature
gemrage-1.0.0 vendor/ruby/1.8/gems/rspec-core-2.0.0/features/command_line/rake_task.feature