Sha256: 48be89df88a912248ddd07b0d9613e64908c8200f5a446a25502e5b9715402c2

Contents?: true

Size: 360 Bytes

Versions: 7

Compression:

Stored size: 360 Bytes

Contents

describe Sail::ApplicationHelper, type: :helper do
  include Sail::ApplicationHelper

  describe '.number_of_pages' do
    subject { number_of_pages }

    before do
      (0...9).each { |i| Sail::Setting.create(name: "setting_#{i}", cast_type: :string, value: i) }
    end

    it 'returns number of pages' do
      expect(subject).to eq(2)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sail-1.4.1 spec/helpers/sail/application_helper_spec.rb
sail-1.4.0 spec/helpers/sail/application_helper_spec.rb
sail-1.3.0 spec/helpers/sail/application_helper_spec.rb
sail-1.2.2 spec/helpers/sail/application_helper_spec.rb
sail-1.2.1 spec/helpers/sail/application_helper_spec.rb
sail-1.2.0 spec/helpers/sail/application_helper_spec.rb
sail-1.1.0 spec/helpers/sail/application_helper_spec.rb