Sha256: 0ffe82e76269d81d30f65d7add2ed7b4c04b88c658e442dfac86136524288174

Contents?: true

Size: 1.06 KB

Versions: 15

Compression:

Stored size: 1.06 KB

Contents

require File.dirname(__FILE__) + '/../spec_helper.rb'
require 'fileutils'

include FileUtils

##
# This is not a complete specification of PreCommit.RSpecOnRails, but 
# just a collection of bug fix regression tests.
describe "RSpecOnRails pre_commit" do
  before do
    @original_dir = File.expand_path(FileUtils.pwd)
    @rails_app_dir = File.expand_path(File.dirname(__FILE__) + "/../../../example_rails_app/")

    Dir.chdir(@rails_app_dir)
    rm_rf('vendor/plugins/rspec_on_rails')
    system("svn export ../rspec_on_rails vendor/plugins/rspec_on_rails")

    @pre_commit = PreCommit::RspecOnRails.new(nil)
  end

  after do
    rm('db/migrate/888_create_purchases.rb', :force => true)
    @pre_commit.destroy_purchase
    Dir.chdir(@original_dir)
  end

  # bug in r1802
  it "should fail noisily if there is a migration name conflict" do
    touch('db/migrate/888_create_purchases.rb')
    lambda { @pre_commit.generate_purchase }.should raise_error
  end

  it "should not fail if tests run ok" do
    lambda { @pre_commit.generate_purchase }.should_not raise_error
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
picolena-0.1.1 rails_plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
picolena-0.1.0 rails_plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
picolena-0.1.3 rails_plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
picolena-0.1.2 rails_plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
picolena-0.1.4 rails_plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
picolena-0.1.5 rails_plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
rspec-1.1.3 pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
spree-0.2.0 vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
typo-5.0.3.98.1 vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
typo-5.0.3.98 vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
typo-5.1.1 vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
typo-5.1.2 vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
typo-5.1.3 vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb
typo-5.1 vendor/plugins/rspec/pre_commit/spec/pre_commit/rspec_on_rails_spec.rb