From 432b648d9ec4e52eef6ffaaad568b32c82e4e234 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 15 Nov 2011 11:23:01 -0500 Subject: [PATCH] fix the tests --- Rakefile | 2 +- guard-rocco.gemspec | 3 +-- lib/guard/rocco.rb | 2 -- lib/guard/rocco/version.rb | 5 ----- spec/lib/guard/rocco_spec.rb | 15 +++++++++------ 5 files changed, 11 insertions(+), 16 deletions(-) delete mode 100644 lib/guard/rocco/version.rb diff --git a/Rakefile b/Rakefile index 60806d9..34c8544 100644 --- a/Rakefile +++ b/Rakefile @@ -9,7 +9,7 @@ RSpec::Core::RakeTask.new(:spec) namespace :spec do desc "Run on three Rubies" task :platforms do - prefix = "rvm 1.8.7,1.9.2,ree ruby" + prefix = "rvm 1.8.7,1.9.2,ree,1.9.3 do" system %{#{prefix} bundle} system %{#{prefix} bundle exec rake spec} exit $?.exitstatus diff --git a/guard-rocco.gemspec b/guard-rocco.gemspec index bf6b201..5d3ac71 100644 --- a/guard-rocco.gemspec +++ b/guard-rocco.gemspec @@ -1,10 +1,9 @@ # -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) -require "guard-rocco" Gem::Specification.new do |s| s.name = "guard-rocco" - s.version = Guard::Rocco::VERSION + s.version = '0.1.0' s.platform = Gem::Platform::RUBY s.authors = ["John Bintz"] s.email = ["john@coswellproductions.com"] diff --git a/lib/guard/rocco.rb b/lib/guard/rocco.rb index 8df1207..d5842d1 100644 --- a/lib/guard/rocco.rb +++ b/lib/guard/rocco.rb @@ -6,8 +6,6 @@ require 'fileutils' module Guard class Rocco < Guard - autoload :VERSION, 'guard/rocco/version' - def initialize(watchers = [], options = {}) super diff --git a/lib/guard/rocco/version.rb b/lib/guard/rocco/version.rb deleted file mode 100644 index aa3a2e6..0000000 --- a/lib/guard/rocco/version.rb +++ /dev/null @@ -1,5 +0,0 @@ -module Guard - module RoccoVersion - VERSION = '0.1.0' - end -end diff --git a/spec/lib/guard/rocco_spec.rb b/spec/lib/guard/rocco_spec.rb index a1c4a69..30a986e 100644 --- a/spec/lib/guard/rocco_spec.rb +++ b/spec/lib/guard/rocco_spec.rb @@ -14,10 +14,13 @@ describe Guard::Rocco do FileUtils.rm_rf doc_dir end - let(:guard) { Guard::Rocco.new([], :dir => doc_dir) } + let(:guard) { Guard::Rocco.new([], options) } let(:filename) { 'lib/guard/rocco.rb' } + let(:options) { { :dir => doc_dir } } describe '#run_all' do + let(:options) { { :dir => doc_dir, :run_on => [ :all ] } } + before do guard.stubs(:all_paths).returns([filename]) end @@ -40,14 +43,14 @@ describe Guard::Rocco do describe 'run options' do it 'should allow array of symbols' do guard = Guard::Rocco.new([], :run_on => [:start, :change]) - guard.run_for?(:start).should be_true - guard.run_for?(:reload).should be_false + guard.send(:run_for?, :start).should be_true + guard.send(:run_for?, :reload).should be_false end it 'should allow symbol' do - guard = Guard::RailsAssets.new([], :run_on => :start) - guard.run_for?(:start).should be_true - guard.run_for?(:reload).should be_false + guard = Guard::Rocco.new([], :run_on => :start) + guard.send(:run_for?, :start).should be_true + guard.send(:run_for?, :reload).should be_false end end end