Sha256: 32889b0907c96b78c2a671f5dac46077961391ad5e57a40aca31be9826342d7c

Contents?: true

Size: 255 Bytes

Versions: 6

Compression:

Stored size: 255 Bytes

Contents

class Post < OpenStruct
  def self.create(attributes)
    @all ||= []
    post = new(attributes)
    @all << post
    attributes['all'] = @all.index(post)
  end

  def self.all
    @all ||= []
    @all
  end

  def self.delete_all
    @all = []
  end
end

Version data entries

6 entries across 3 versions & 1 rubygems

Version Path
cypress-on-rails-1.2.0 spec/integrations/rails_3_2/app/models/post.rb
cypress-on-rails-1.2.0 spec/integrations/rails_4_2/app/models/post.rb
cypress-on-rails-1.1.1 spec/integrations/rails_3_2/app/models/post.rb
cypress-on-rails-1.1.1 spec/integrations/rails_4_2/app/models/post.rb
cypress-on-rails-1.1.0 spec/integrations/rails_3_2/app/models/post.rb
cypress-on-rails-1.1.0 spec/integrations/rails_4_2/app/models/post.rb