Sha256: 1cfbac509b76da875e8115b88c841fbe558d196a58e5b56f554768d0c4b9aec5

Contents?: true

Size: 1.12 KB

Versions: 4

Compression:

Stored size: 1.12 KB

Contents

require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')

smart = Smartfm::Item.find(33158, :include_sentences => true)

describe Smartfm::Item do
  it "should respond to attribute methods" do
    Smartfm::Item::ATTRIBUTES.each do |attr|
      smart.should respond_to(attr)
    end
    Smartfm::Item::Response::ATTRIBUTES.each do |attr|
      smart.responses.first.should respond_to(attr)
    end
    Smartfm::Item::Cue::ATTRIBUTES.each do |attr|
      smart.cue.should respond_to(attr)
    end
  end
end

describe Smartfm::Item, '#cue' do
  it "should return a instance o Smartfm::Item::Cue" do
    smart.cue.should be_a(Smartfm::Item::Cue)
  end
end

describe Smartfm::Item, '#responses' do
  it "should return a Array of Smartfm::Item::Response" do
    smart.responses.should be_a(Array)
    smart.responses.each do |response|
      response.should be_a(Smartfm::Item::Response)
    end
  end
end

describe Smartfm::Item, '#sentences' do
  it "should return a Array of Smartfm::Sentence" do
    smart.sentences.should be_a(Array)
    smart.sentences.each do |sentence|
      sentence.should be_a(Smartfm::Sentence)
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
nov-smartfm-0.4.0 spec/smartfm/model/item_spec.rb
smartfm-0.3.0 spec/smartfm/model/item_spec.rb
smartfm-0.4.0 spec/smartfm/model/item_spec.rb
smartfm-0.3.1 spec/smartfm/model/item_spec.rb