Sha256: a4d3d13856b00706188db3bd47a40a9f79c00a44fd522f712c02410193b16b70
Contents?: true
Size: 929 Bytes
Versions: 4
Compression:
Stored size: 929 Bytes
Contents
require 'spec_helper' require 'generators/rspec/install/install_generator' describe Rspec::Generators::InstallGenerator do destination File.expand_path("../../../../../tmp", __FILE__) before { prepare_destination } it "generates .rspec" do run_generator file('.rspec').should exist end it "generates spec/spec_helper.rb" do run_generator File.read( file('spec/spec_helper.rb') ).should =~ /^require 'rspec\/autorun'$/m end if ::Rails::VERSION::STRING >= '4' it "generates spec/spec_helper.rb with a check for pending migrations" do run_generator File.read( file('spec/spec_helper.rb') ).should =~ /ActiveRecord::Migration\.check_pending!/m end else it "generates spec/spec_helper.rb without a check for pending migrations" do run_generator File.read( file('spec/spec_helper.rb') ).should_not =~ /ActiveRecord::Migration\.check_pending!/m end end end
Version data entries
4 entries across 4 versions & 1 rubygems