Skip to content

Commit

Permalink
Update to RSpec 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
harukizaemon committed Oct 22, 2010
1 parent 2af594d commit 5f33fba
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 15 deletions.
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--colour
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Dir[File.expand_path("tasks/**/*.rb")].each do |task_file|
require task_file
end

task :default => [ :spec ]
task :default => [ :rspec ]
4 changes: 2 additions & 2 deletions hamster.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Gem::Specification.new do |s|
s.summary = "Efficient, Immutable, Thread-Safe Collection classes for Ruby"
s.description = s.summary
s.author = "Simon Harris"
s.email = "haruki.zaemon@gmail.com"
s.email = "haruki_zaemon@mac.com"
s.homepage = "http://github.com/harukizaemon/hamster"
s.require_path = "lib"
s.files = Dir["lib/**/*", "spec/**/*", "tasks/**/*", "Rakefile"] + s.extra_rdoc_files
s.add_development_dependency("rspec", ">= 1.2.9")
s.add_development_dependency("rspec", ">= 2.0.0")
s.add_development_dependency("diff-lcs", ">= 1.1.2")
end
2 changes: 1 addition & 1 deletion lib/hamster/list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def respond_to?(name, include_private = false)
private

def method_missing(name, *args, &block)
return accessor($1) if CADR === name.to_s
return accessor($1) if CADR === name
super
end

Expand Down
18 changes: 15 additions & 3 deletions spec/hamster/core_ext/io_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,22 @@

describe "#to_list" do

it "returns an equivalent list" do
File.open(File.dirname(__FILE__) + "/io_spec.txt") do |io|
io.to_list.should == Hamster.list("A\n", "B\n", "C\n")
context "with a File" do

it "returns an equivalent list" do
File.open(File.dirname(__FILE__) + "/io_spec.txt") do |io|
io.to_list.should == Hamster.list("A\n", "B\n", "C\n")
end
end

end

context "with a StringIO" do

it "returns an equivalent list" do
StringIO.new("A\nB\nC\n").to_list.should == Hamster.list("A\n", "B\n", "C\n")
end

end

end
Expand Down
2 changes: 0 additions & 2 deletions spec/spec.opts

This file was deleted.

5 changes: 5 additions & 0 deletions tasks/rspec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'rspec/core/rake_task'

desc "Run specifications"
RSpec::Core::RakeTask.new(:rspec) do |t|
end
6 changes: 0 additions & 6 deletions tasks/spec.rb

This file was deleted.

0 comments on commit 5f33fba

Please sign in to comment.