Sha256: e9affa0d02ff5a97678914a2dd24276dd87ca9cc6430e85ef0502187139de49f
Contents?: true
Size: 1.58 KB
Versions: 6
Compression:
Stored size: 1.58 KB
Contents
require 'spec_helper' module RailsBestPractices module Reviews describe UseTurboSprocketsRails3Review do let(:runner) { Core::Runner.new(prepares: Prepares::GemfilePrepare.new, reviews: UseTurboSprocketsRails3Review.new) } it "should use turbo-sprockets-rails3" do content = <<-EOF source "http://rubygems.org" gem "rails" EOF runner.prepare('Gemfile', content) content = <<-EOF load 'deploy' if respond_to?(:namespace) load 'deploy/assets' load 'config/deploy' EOF runner.review('Capfile', content) runner.should have(1).errors runner.errors[0].to_s.should == "Capfile:2 - speed up assets precompile with turbo-sprockets-rails3" end it "should not use turbo-sprockets-rails3 with turbo-sprockets-rails3 gem" do content = <<-EOF source "http://rubygems.org" gem "rails" group :assets do gem "turbo-sprockets-rails3" end EOF runner.prepare('Gemfile', content) content = <<-EOF load 'deploy' if respond_to?(:namespace) load 'deploy/assets' load 'config/deploy' EOF runner.review('Capfile', content) runner.should have(0).errors end it "should not use turbo-sprockets-rails3 without deploy/assets" do content = <<-EOF load 'deploy' if respond_to?(:namespace) #load 'deploy/assets' load 'config/deploy' EOF runner.review('Capfile', content) runner.should have(0).errors end end end end
Version data entries
6 entries across 6 versions & 1 rubygems