Sha256: 37df619cfc200f03f100177d9bc998049e5c68623eed8e708ce781804c441c45

Contents?: true

Size: 906 Bytes

Versions: 18

Compression:

Stored size: 906 Bytes

Contents

gem 'fixture_builder', :group => [:test]
gem 'mocha', :group => [:test]

after_everything do

  create_file "spec/support/fixture_builder.rb", <<-RUBY
FixtureBuilder.configure do |fbuilder|
  # rebuild fixtures automatically when these files change:
  fbuilder.files_to_check += Dir["spec/factories/*.rb", "spec/support/fixture_builder.rb"]

  # now declare objects
  fbuilder.factory do

  end
end   
RUBY

inject_into_file "spec/spec_helper.rb", :after => "require 'rspec/rails'\n" do
  "require 'spec/support/fixture_builder.rb'\n"
end

gsub_file "spec/spec_helper.rb", "config.mock_with :rspec", "# config.mock_with :rspec"
gsub_file "spec/spec_helper.rb", "# config.mock_with :mocha", "  config.mock_with :mocha"

end

__END__

name: FixtureBuilder
description: "Allows you to build file fixtures from an object mother factory."
author: lightyrs

category: testing
run_after: [rspec]
requires: [rspec]

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
appscrolls-0.11.2 scrolls/untested/fixture_builder.rb
appscrolls-0.11.1 scrolls/untested/fixture_builder.rb
appscrolls-0.11.0 scrolls/untested/fixture_builder.rb
appscrolls-0.10.1 scrolls/untested/fixture_builder.rb
appscrolls-0.10.0 scrolls/untested/fixture_builder.rb
appscrolls-0.9.0 scrolls/untested/fixture_builder.rb
appscrolls-0.8.4 scrolls/zzz/fixture_builder.rb
appscrolls-0.8.3 scrolls/zzz/fixture_builder.rb
appscrolls-0.8.2 scrolls/zzz/fixture_builder.rb
appscrolls-0.8.1 scrolls/zzz/fixture_builder.rb
appscrolls-0.8.0 scrolls/zzz/fixture_builder.rb
appscrolls-0.7.1 scrolls/zzz/fixture_builder.rb
appscrolls-0.7.0 scrolls/zzz/fixture_builder.rb
eldarscrolls-0.7.0 scrolls/zzz/fixture_builder.rb
ey_rails_wizard-0.6.0 scrolls/zzz/fixture_builder.rb
ey_rails_wizard-0.5.0 scrolls/fixture_builder.rb
ey_rails_wizard-0.4.0 scrolls/fixture_builder.rb
ey_rails_wizard-0.3.1 recipes/fixture_builder.rb