diff --git a/spec/finder_spec.rb b/spec/finder_spec.rb index bc78fed..1200319 100644 --- a/spec/finder_spec.rb +++ b/spec/finder_spec.rb @@ -82,11 +82,7 @@ describe Redistat::Finder do end it "should throw error on invalid options" do - begin - stats = Redistat::Finder.find(:from => 3.hours.ago) - rescue ArgumentError => e - e.class.to_s.should == "Redistat::InvalidOptions" - end + lambda { Redistat::Finder.find(:from => 3.hours.ago) }.should raise_error(Redistat::InvalidOptions) end