This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe User do | |
it "should be able to subscribe to a plan" do | |
user.subscribe(plan) | |
user.should have(1).subscription | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "should be able to sign up for a plan" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user.sign_up_for(plan) | |
user.should have(1).plan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (availability_flag == :available && !current_user.available?) || | |
(availability_flag == :unavailable && current_user.available?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def delegate(*methods) | |
... | |
options = methods.pop | |
... | |
to = options[:to] | |
... | |
prefix = options[:prefix] ? "#{options[:prefix] == true ? to : options[:prefix]}_" : '' | |
... | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def delegate(*methods) | |
... | |
prefix, to = methods.pop.values_at(:prefix, :to) | |
... | |
method_prefix = prefix ? "#{prefix == true ? to : prefix}_" : '' | |
... | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def delegate(*methods) | |
... | |
prefix, to = methods.pop.values_at(:prefix, :to) | |
... | |
method_prefix = prefix ? "#{prefix ? to : prefix}_" : '' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def delegate(*methods) | |
... | |
prefix, to = methods.pop.values_at(:prefix, :to) | |
... | |
method_prefix = if prefix | |
"#{prefix == true ? to : prefix}_" | |
else | |
'' | |
end | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def delegate(*methods) | |
... | |
prefix, to = methods.pop.values_at(:prefix, :to) | |
... | |
method_prefix = '' | |
if prefix | |
method_prefix = "#{prefix == true ? to : prefix}_" | |
end | |
... | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html | |
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<link rel="stylesheet" | |
href="/Users/light/.vim/plugin/vim-markdown-preview/stylesheets/github.css"> |