-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
require 'capybara/rspec' | ||
require 'capybara/rspec' | ||
require 'rspec-rails' | ||
|
||
module Steak | ||
class Railtie < ::Rails::Railtie | ||
rake_tasks do | ||
load "tasks/steak_tasks.rake" | ||
end | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace :spec do | ||
desc "Run the acceptance specs in spec/acceptance" | ||
RSpec::Core::RakeTask.new(:acceptance => "db:test:prepare") do |t| | ||
t.pattern = "spec/acceptance/**/*_spec.rb" | ||
end | ||
end |
This file contains 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 contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
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 | ||
generate_rails_project_with_steak | ||
create_file 'spec/unit_spec.rb', <<-RSPEC | ||
require 'spec_helper' | ||
describe Object do | ||
it { should respond_to :to_s } | ||
end | ||
RSPEC | ||
run 'rails g steak:spec my_spec' | ||
run 'rake db:migrate' | ||
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 | ||
|
||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require 'rubygems' | ||
require 'bundler/setup' | ||
|
||
require 'capybara/rspec' | ||
require 'active_support/all' | ||
require 'rails' | ||
require 'steak' | ||
|
||
require 'support/helpers' |
This file contains 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