Sha256: dce307cd37ce69cb6f87404b2cfe33a556df6ba6848d9a80a84a9e2cd2374ed5

Contents?: true

Size: 948 Bytes

Versions: 3

Compression:

Stored size: 948 Bytes

Contents

require 'spec_helper'

feature 'Rake support', %q{
  In order to conveniently run my specs along with the rest of my test suite
  As a Rails developer
  I want rake support in Steak
} do

  background do
    new_project_from :rails_project_with_steak
    create_file 'spec/models/model_spec.rb', <<-RSPEC
      require 'spec_helper'

      describe Object do
        it { should respond_to :to_s }
      end
    RSPEC
    run 'rails g steak:spec my_spec'
  end

  scenario 'to run acceptance specs as part of the test suite' do
    run 'rake spec'
    output.should =~ /2 examples, 0 failures/

    run 'rake'
    output.should =~ /2 examples, 0 failures/
  end

  scenario 'to run only acceptance specs' do
    run 'rake spec:acceptance'
    output.should =~ /1 example, 0 failures/
  end
  
  scenario "to get stats" do
    run 'rake stats'
    output.should =~ /Model specs \D+ 5 /
    output.should =~ /Acceptance specs \D+ [1-9]+ /
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
steak-2.0.0 spec/acceptance/rake_support_spec.rb
steak-2.0.0.beta2 spec/acceptance/rake_support_spec.rb
steak-2.0.0.beta1 spec/acceptance/rake_support_spec.rb