spec/operation_spec.rb in wordnik-4.06.05 vs spec/operation_spec.rb in wordnik-4.06.06
- old
+ new
@@ -1,21 +1,18 @@
require 'spec_helper'
describe Wordnik::Operation do
before(:each) do
- VCR.use_cassette('words', :record => :new_episodes) do
- @response = Typhoeus::Request.get("http://beta.wordnik.com/v4/word.json")
- end
- @resource = Wordnik::Resource.new(:name => "word", :raw_data => JSON.parse(@response.body))
+ @resource = Wordnik::Resource.new(:name => "word", :raw_data => JSON.parse(sample_resource_body))
@endpoint = @resource.endpoints.first
@operation = @endpoint.operations.first
end
describe "initialization" do
it "successfully initializes" do
- @operation.summary.should =~ /returns the WordObject/i
+ @operation.summary.should_not be_nil
end
it "sets parameters" do
@operation.parameters.class.should == Array
@operation.parameters.first.class.should == Wordnik::OperationParameter
\ No newline at end of file