Skip to content

Instantly share code, notes, and snippets.

@jtadeulopes
Created August 29, 2009 01:41
Show Gist options
  • Select an option

  • Save jtadeulopes/177356 to your computer and use it in GitHub Desktop.

Select an option

Save jtadeulopes/177356 to your computer and use it in GitHub Desktop.
# basico, to testando desta forma
# action
def new
@driver = Driver.new
end
# teste com remarkable
describe :get => :new do
expects :new, :on => Driver, :returns => driver_proc
should_assign_to :driver
should_render_template 'new'
end
# action new com nested attributes
def new
@driver = Driver.new
@driver_detail = @driver.build_driver_detail
end
# pensei em escrever o test com rspec pra entender melhor e depois passar o pro remarkable =/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment