spec/spec_helper.rb in sprockets-helpers-0.9.1 vs spec/spec_helper.rb in sprockets-helpers-1.0.0
- old
+ new
@@ -1,17 +1,24 @@
require 'sprockets'
require 'sprockets-helpers'
+require 'sinatra/base'
+require 'sinatra/sprockets/helpers'
require 'construct'
require 'pathname'
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
RSpec.configure do |config|
config.include Construct::Helpers
+ # Disable old `should` syntax
+ config.expect_with :rspec do |c|
+ c.syntax = :expect
+ end
+
# Returns a Sprockets environment. Automatically
# appends the 'assets' path if available.
def env
@env ||= Sprockets::Environment.new.tap do |env|
env.append_path 'assets' if File.directory?('assets')
@@ -42,7 +49,6 @@
end
c.file('assets/a.css')
c.file('assets/b.css')
}.call(construct)
end
-
end