Sha256: dfa825dff707ecf34c560470dbd9a29882449cb64550782bc946be5ce57e1c86
Contents?: true
Size: 661 Bytes
Versions: 52
Compression:
Stored size: 661 Bytes
Contents
require 'opal' require 'vienna' require 'models/todo' RSpec.configure do |config| config.before { Todo.reset! } end describe Todo do before do @task_a = Todo.create(title: 'Foo', completed: true) @task_b = Todo.create(title: 'Bar', completed: false) @task_c = Todo.create(title: 'Baz', completed: true) @task_d = Todo.create(title: 'Buz', completed: false) end describe '.active' do it "returns all non-completed todos" do expect(Todo.active).to eq([@task_b, @task_d]) end end describe '.completed' do it "returns all completed todos" do expect(Todo.completed).to eq([@task_a, @task_c]) end end end
Version data entries
52 entries across 52 versions & 3 rubygems