Navigation Menu

Skip to content

Commit

Permalink
Fix tests for >= rspec 2.99.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaak committed Nov 2, 2015
1 parent 109d000 commit f35f4e8
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .rspec
@@ -1,2 +1 @@
--color
--format n
--order defined
4 changes: 2 additions & 2 deletions spec/xapian_db/adapters/base_adapter_spec.rb
Expand Up @@ -145,7 +145,7 @@ class ClassB < ClassA

let (:db) { XapianDb.database }

before :all do
before :each do

XapianDb.setup do |config|
config.adapter :generic
Expand Down Expand Up @@ -192,4 +192,4 @@ class ClassB < ClassA

end

end
end
2 changes: 1 addition & 1 deletion spec/xapian_db/adapters/generic_adapter_spec.rb
Expand Up @@ -31,7 +31,7 @@ def initialize(key)

it "should raise an exception if the unique key is not configured" do
XapianDb::Adapters::GenericAdapter.unique_key # undef the unique key
expect{XapianDb::Adapters::GenericAdapter.add_class_helper_methods_to(MyClass)}.to raise_error
expect{XapianDb::Adapters::GenericAdapter.add_class_helper_methods_to(MyClass)}.to raise_error "Unique key is not configured for generic adapter!"
end

it "should add the method 'xapian_id' to the configured class" do
Expand Down
4 changes: 2 additions & 2 deletions spec/xapian_db/config_spec.rb
Expand Up @@ -76,7 +76,7 @@
it "raises an error if the configured adapter is unknown" do
expect{XapianDb::Config.setup do |config|
config.adapter :unknown
end}.to raise_error
end}.to raise_error LoadError
end
end

Expand Down Expand Up @@ -124,7 +124,7 @@
it "raises an error if the configured writer is unknown" do
expect{XapianDb::Config.setup do |config|
config.writer :unknown
end}.to raise_error
end}.to raise_error LoadError
end

end
Expand Down
2 changes: 1 addition & 1 deletion spec/xapian_db/database_spec.rb
Expand Up @@ -403,7 +403,7 @@ def initialize(id, text)

let (:db) { XapianDb.database }

before :all do
before :each do
XapianDb.setup do |config|
config.adapter :generic
config.database :memory
Expand Down
4 changes: 2 additions & 2 deletions spec/xapian_db/resultset_spec.rb
Expand Up @@ -65,7 +65,7 @@
end

it "raises an exception if an unsupported option is passed" do
expect{XapianDb::Resultset.new(@enquiry, :unsupported => "?")}.to raise_error
expect{XapianDb::Resultset.new(@enquiry, :unsupported => "?")}.to raise_error 'unsupported options for resultset: {:unsupported=>"?"}'
end

it "accepts a limit option (as a string or an integer)" do
Expand Down Expand Up @@ -110,7 +110,7 @@
end

it "raises an exception if page is requested that does not exist" do
expect{XapianDb::Resultset.new(@enquiry, :db_size => @matches.size, :per_page => 2, :page => 3)}.to raise_error
expect{XapianDb::Resultset.new(@enquiry, :db_size => @matches.size, :per_page => 2, :page => 3)}.to raise_error "page does not exist"
end

it "should populate itself with found xapian documents" do
Expand Down
2 changes: 1 addition & 1 deletion xapian_db.gemspec
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |s|
s.add_dependency "daemons", ">= 1.0.10"

s.add_development_dependency "guard"
s.add_development_dependency "rspec", ">= 2.3.1"
s.add_development_dependency "rspec", ">= 2.99.0"
s.add_development_dependency "simplecov", ">= 0.3.7"
s.add_development_dependency "beanstalk-client", ">= 1.1.0"
s.add_development_dependency "rake"
Expand Down

0 comments on commit f35f4e8

Please sign in to comment.