Sha256: 68f41de1446961118d77e011044e15871a160a3917aab024e46442a58b5d3ae5

Contents?: true

Size: 488 Bytes

Versions: 5

Compression:

Stored size: 488 Bytes

Contents

shared_context "TemporaryModel" do
  before { class Size < Findable::Base; define_field :name; end }
  after { Size.delete_all; Object.send(:remove_const, "Size") }
  let(:model) { Size }
  let(:instance) { model.new }
end

# model for read only test
shared_context "ReadOnlyModel" do
  let(:read_model) { Category }
  let(:id) { CategoryData.first[:id] }
  let(:invalid_id) { CategoryData.last[:id] + 1 }
  let(:name) { CategoryData.first[:name] }
  let(:invalid_name) { "invalid" }
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
findable-0.2.2 spec/support/shared_contexts.rb
findable-0.2.1 spec/support/shared_contexts.rb
findable-0.2.0 spec/support/shared_contexts.rb
findable-0.1.5 spec/support/shared_contexts.rb
findable-0.1.4 spec/support/shared_contexts.rb