Skip to content

Instantly share code, notes, and snippets.

@artworx
Created February 7, 2013 08:38
Show Gist options
  • Select an option

  • Save artworx/4729532 to your computer and use it in GitHub Desktop.

Select an option

Save artworx/4729532 to your computer and use it in GitHub Desktop.
require 'spec_helper'
class Crazy < Drivy::Service
attribute :starts_at_date, String
attribute :previous_rental_id, Integer
def test
ap starts_at_date
if previous_rental_id.present?
starts_at_date = "yesterday"
end
ap starts_at_date
end
end
describe "aa" do
it "aa" do
Crazy.new(starts_at_date: "monday").test
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment