Sha256: 36591f93780c4e39e40a894989ddc08ea2850da57da7a76b3fe6c5556ae7432b

Contents?: true

Size: 424 Bytes

Versions: 7

Compression:

Stored size: 424 Bytes

Contents

shared_examples 'date delegation' do
  describe '#year' do
    it 'matches the year from #date' do
      expect(subject.year).to eq subject.date.year
    end
  end

  describe '#month' do
    it 'matches the month from #date' do
      expect(subject.month).to eq subject.date.month
    end
  end

  describe '#day' do
    it 'matches the day from #date' do
      expect(subject.day).to eq subject.date.day
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
vnstat-ruby-1.1.0 spec/support/shared_examples/shared_examples_for_date_delegation.rb
vnstat-ruby-1.0.5 spec/support/shared_examples/shared_examples_for_date_delegation.rb
vnstat-ruby-1.0.4 spec/support/shared_examples/shared_examples_for_date_delegation.rb
vnstat-ruby-1.0.3 spec/support/shared_examples/shared_examples_for_date_delegation.rb
vnstat-ruby-1.0.2 spec/support/shared_examples/shared_examples_for_date_delegation.rb
vnstat-ruby-1.0.1 spec/support/shared_examples/shared_examples_for_date_delegation.rb
vnstat-ruby-1.0.0 spec/support/shared_examples/shared_examples_for_date_delegation.rb