Sha256: dda28065b3e6dec18e55b82bd1a1bd1b8f19502e687e3271b85a4d158fbcdedf

Contents?: true

Size: 924 Bytes

Versions: 13

Compression:

Stored size: 924 Bytes

Contents

require File.expand_path('../../../spec/helper', __FILE__)
require File.expand_path('../../../examples/app/todolist/start', __FILE__)

TodoList::Task.create(:title => 'do the dishes')
TodoList::Task.create(:title => 'build an awesome Ramaze app')

describe "Todolist app example" do
  behaves_like :rack_test
  
  it "should list tasks" do
    r = get('/').body
    r.should.include('do the dishes')
    r.should.include('build an awesome Ramaze app')
  end
  
  it "should close a task" do
    get('/close/do+the+dishes')
    r = get('/').body
    r.should.include('<td class="status"> Done </td>')
  end
  
  it "should delete a task" do
    get('/delete/build+an+awesome+Ramaze+app')
    r = get('/').body
    r.should.not.include("build an awesome Ramaze app")
  end
  
  it "should open a task" do
    get('/open/do+the+dishes')
    r = get('/').body
    r.should.include('<td class="status"> Pending </td>')
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ramaze-2023.01.06 spec/examples/todolist.rb
ramaze-2012.12.08 spec/examples/todolist.rb
ramaze-2012.12.08b spec/examples/todolist.rb
ramaze-2012.04.14 spec/examples/todolist.rb
ramaze-2012.03.07 spec/examples/todolist.rb
ramaze-2011.12.28 spec/examples/todolist.rb
ramaze-2011.10.23 spec/examples/todolist.rb
ramaze-2011.07.25 spec/examples/todolist.rb
ramaze-2011.01.30 spec/examples/todolist.rb
ramaze-2011.01 spec/examples/todolist.rb
ramaze-2010.06.18 spec/examples/todolist.rb
ramaze-2010.04.04 spec/examples/todolist.rb
ramaze-2010.04 spec/examples/todolist.rb