Sha256: 646207d7e1634c516a8d0285eea0c495ec00c199647a1233106104ddd7e424b5

Contents?: true

Size: 493 Bytes

Versions: 1

Compression:

Stored size: 493 Bytes

Contents

require 'spec_helper'

describe Ripple::Conversion do
  # require 'support/models/box'

  before :each do
    @box = Box.new { |a| a.key = 'some-key' }
    @box.stub!(:new?).and_return(false)
  end

  it "should return the key as an array for to_key" do
    @box.to_key.should == ['some-key']
  end

  it "should be able to be converted to a param" do
    @box.to_param.should == 'some-key'
  end

  it "should be able to be converted to a model" do
    @box.to_model.should == @box
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ripple-1.0.0.beta spec/ripple/conversion_spec.rb