Sha256: a54d4febf3e0d3c9445433665cceaeff6499de02f443658ad5424d4f7b23dc39

Contents?: true

Size: 1009 Bytes

Versions: 1

Compression:

Stored size: 1009 Bytes

Contents

require 'test_helper'

class SetupTest < BaseTest
  describe "populated" do
    subject { AlbumForm.new(Album.new("Best Of", hit, [Song.new("Fallout"), Song.new("Roxanne")])) }

    it { subject.title.must_equal "Best Of" }


    it { subject.hit.must_be_kind_of Reform::Form }
    it { subject.hit.title.must_equal "Roxanne" }

    it { subject.songs.must_be_kind_of Array }
    it { subject.songs.size.must_equal 2 }

    it { subject.songs[0].must_be_kind_of Reform::Form }
    it { subject.songs[0].title.must_equal "Fallout" }

    it { subject.songs[1].must_be_kind_of Reform::Form }
    it { subject.songs[1].title.must_equal "Roxanne" }
  end


  describe "empty" do
    subject { AlbumForm.new(Album.new) }

    it { subject.title.must_equal nil }


# TODO: discuss and implement.
    # it { subject.hit.must_be_kind_of Reform::Form }
    # it { subject.hit.title.must_equal nil }


    # it { subject.songs.must_be_kind_of Reform::Form::Forms }
    # it { subject.songs.size.must_equal 0 }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reform-1.0.0 test/setup_test.rb