Sha256: 87e6ef7b0102fcecdad04becb7f1369278cda8851466686543f60c099a6918a3

Contents?: true

Size: 1.22 KB

Versions: 2

Compression:

Stored size: 1.22 KB

Contents

require_relative '../../test_helper'

describe PicturehouseUk::Screening do

  before { WebMock.disable_net_connect! }

  describe '#new film_name, cinema_name, date, time, varient' do
    it 'stores film_name, cinema_name & when (in UTC)' do
      screening = PicturehouseUk::Screening.new 'Iron Man 3', "Duke's At Komedia", Time.parse('2013-09-12 11:00')
      screening.film_name.must_equal 'Iron Man 3'
      screening.cinema_name.must_equal "Duke's At Komedia"
      screening.when.must_equal Time.utc(2013, 9, 12, 10, 0)
      screening.varient.must_equal nil
    end

    it 'stores varient if passed' do
      screening = PicturehouseUk::Screening.new 'Iron Man 3', "Duke's At Komedia", Time.utc(2013, 9, 12, 11, 0), 'baby'
      screening.film_name.must_equal 'Iron Man 3'
      screening.cinema_name.must_equal "Duke's At Komedia"
      screening.when.must_equal Time.utc(2013, 9, 12, 11, 0)
      screening.varient.must_equal 'baby'
    end
  end

  describe '#date' do
    subject { PicturehouseUk::Screening.new('Iron Man 3', "Duke's At Komedia", Time.utc(2013, 9, 12, 11, 0), '3d').date }
    it 'should return date of showing' do
      subject.must_be_instance_of(Date)
      subject.must_equal Date.new(2013, 9, 12)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
picturehouse_uk-1.0.1 test/lib/picturehouse_uk/screening_test.rb
picturehouse_uk-1.0.0 test/lib/picturehouse_uk/screening_test.rb