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 show_project(username, project_name) | |
| user = User.with(username) | |
| project = Project.for(user).named(project_name) | |
| Presenter::Board.new(project, user).render | |
| 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 a_method(required_arguments, optional_arguments, | |
| *additional_required_arguments, | |
| keyword_arguments: "with_defaults", | |
| **rest_of_keyword_arguments, | |
| &block_capture) | |
| 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
| module Cucumber | |
| module Impersonators | |
| class BankManager | |
| def initialize(world) | |
| @world = world | |
| end | |
| def method_missing(method, *args, &block) | |
| @world.send(method, *args, &block) | |
| 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
| module Cucumber | |
| module Impersonators | |
| class BankManager | |
| def initialize(world) | |
| @world = world | |
| end | |
| def login | |
| @world.visit '/login' | |
| @world.fill_in 'username', with: 'me' |
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
| Dir.should_receive(:glob).and_yield(post_name) | |
| Post.should_receive(:load_from_file).and_return(post) |
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
| Dir.glob("#{File.dirname(__FILE__) + '/../../posts/*.yml'}") do |file| | |
| post = Post.load_from_file(file) | |
| 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
| class Someclass < Struct.new(:listener) | |
| def sign_up attributes | |
| post '/sign-up', attributes, | |
| success: ->(response) { listener.user_signed_up attributes.merge(response) }, | |
| error: ->(cause) {listener.error_signing_up_user cause} | |
| 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
| class A | |
| def self.ouch | |
| raise "blarrrghhh" | |
| end | |
| end | |
| class B | |
| def self.ouch | |
| begin | |
| A.ouch |
NewerOlder