Skip to content

Commit

Permalink
upgrade to RSpec 2
Browse files Browse the repository at this point in the history
  • Loading branch information
jnicklas committed May 18, 2011
1 parent 4d5ebf5 commit 10398b7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
7 changes: 3 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ require 'bundler'
Bundler::GemHelper.install_tasks

require 'rake'
require 'spec/rake/spectask'
require 'rspec/core/rake_task'
require 'cucumber'
require 'cucumber/rake/task'

desc "Run all examples"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_files = FileList['spec/**/*.rb']
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = %w[--color]
end

desc "Run cucumber features"
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "features --format progress"
end


task :default => [:spec, :features]
2 changes: 1 addition & 1 deletion carrierwave.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Gem::Specification.new do |s|
s.add_dependency("activesupport", ["~> 3.0"])

s.add_development_dependency "rails", ["3.0.5"]
s.add_development_dependency "rspec", ["1.3.0"]
s.add_development_dependency "rspec", ["~> 2.0"]
s.add_development_dependency "excon"
s.add_development_dependency "fog"
s.add_development_dependency "cucumber"
Expand Down
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require File.join(File.dirname(__FILE__), 'activerecord')
require File.join(File.dirname(__FILE__), 'datamapper')

require 'spec'
require 'rspec'
require 'carrierwave'
require 'sham_rack'

Expand Down
2 changes: 1 addition & 1 deletion spec/mount_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def monkey

describe '#image' do
it "should retrieve a file from the storage if a value is stored in the database" do
@instance.should_receive(:read_uploader).at_least(:once).with(:monkey).twice.and_return('test.jpg')
@instance.should_receive(:read_uploader).at_least(:once).with(:monkey).and_return('test.jpg')
@instance.image.should be_an_instance_of(@uploader)
@instance.image.current_path.should == public_path('uploads/test.jpg')
end
Expand Down
4 changes: 1 addition & 3 deletions spec/sanitized_file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
describe CarrierWave::SanitizedFile do

before do
unless File.exists?(file_path('llama.jpg'))
FileUtils.cp(file_path('test.jpg'), file_path('llama.jpg'))
end
FileUtils.cp(file_path('test.jpg'), file_path('llama.jpg'))
end

after(:all) do
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def change_locale_and_store_translations(locale, translations, &block)
end
end

Spec::Runner.configure do |config|
RSpec.configure do |config|
config.include CarrierWave::Test::Matchers
config.include CarrierWave::Test::MockFiles
config.include CarrierWave::Test::MockStorage
Expand Down

0 comments on commit 10398b7

Please sign in to comment.