spec/wordnik_spec.rb in wordnik-0.4.7 vs spec/wordnik_spec.rb in wordnik-4.06.00
- old
+ new
@@ -17,11 +17,11 @@
Wordnik.resources.class.should == Hash
Wordnik.resources[:word].class.should == Wordnik::Resource
end
it "has as many resources as there are resource names" do
- Wordnik.resources.size.should == Wordnik.resource_names.size
+ Wordnik.resources.size.should == Wordnik.configuration.resource_names.size
end
it "assigns resource keys that match the resource names" do
Wordnik.resources[:word].name.should == :word
end
@@ -53,10 +53,10 @@
config.api_key = CREDENTIALS[:api_key]
config.username = CREDENTIALS[:username]
config.password = 'wrong!'
config.base_uri = "beta.wordnik.com/v4"
end
- lambda { Wordnik.authenticate }.should raise_error(ApiServerError)
+ lambda { Wordnik.authenticate }.should raise_error(AuthorizationError)
Wordnik.authenticated?.should == false
end
it "fails if username and/or password are absent" do
Wordnik.de_authenticate
\ No newline at end of file