Sha256: 378008e5c93d7309016733c2418864d30297117bf3ed8229882b002937e61104

Contents?: true

Size: 361 Bytes

Versions: 5

Compression:

Stored size: 361 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Pupa::Vote do
  let :object do
    Pupa::Vote.new(option: 'yes', voter_id: 'john-q-public', vote_event_id: 'vote-42')
  end

  describe '#to_s' do
    it 'should return a human-readable string' do
      expect(object.to_s).to eq('yes by john-q-public in vote-42')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pupa-0.2.4 spec/models/vote_spec.rb
pupa-0.2.3 spec/models/vote_spec.rb
pupa-0.2.2 spec/models/vote_spec.rb
pupa-0.2.1 spec/models/vote_spec.rb
pupa-0.2.0 spec/models/vote_spec.rb