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
| const hello = () => { | |
| console.log('Hello World'); | |
| } |
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
| ValidationRule = Ember.Object.extend | |
| description: null | |
| constraint: null | |
| validate: (target) -> | |
| return @constraint.call(target) | |
| ValidationResult = Ember.Object.extend | |
| successfulRules: [] | |
| brokenRules: [] |
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 'When extending an item with a dynamic module that dynamically defines methods' do | |
| before (:each) do | |
| @target = Object.new | |
| @the_module = Module.new do | |
| define_method :age do | |
| 33 | |
| end | |
| 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
| module RSpec | |
| Matchers.define :have_received do|symbol,*args| | |
| match do|fake| | |
| result = true | |
| method = fake.received(symbol) | |
| result &= method != nil | |
| unless (args.count == 0) | |
| result &= method.called_with(*args) != nil | |
| 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
| only /Chrome/ do | |
| imap "<Cmd-o>", lambda{ | |
| send(".com<Enter>") | |
| } | |
| 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
| public class when_doing_something :Observes<SomeClass> | |
| { | |
| It should_complete = () => | |
| { | |
| sut.DoSomething().ShouldBeTrue(); | |
| }; | |
| } |
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
| public class SomeClassSpecs | |
| { | |
| public class when_doing_something | |
| { | |
| It should_complete = () => | |
| { | |
| new SomeClass().DoSomething().ShouldBeTrue(); | |
| }; | |
| } | |
| } |
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
| public class when_doing_something | |
| { | |
| It should_complete = () => | |
| { | |
| new SomeClass().DoSomething().ShouldBeTrue(); | |
| }; | |
| } |
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 Command | |
| def initialize(action,description) | |
| @action = action | |
| @description = description | |
| end | |
| def call | |
| @action.call | |
| end | |
| def to_s | |
| "#{@description}" |
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
| require '~/viking_develop_with_passion.rb' | |
| # Ignore the following apps | |
| disable "Remote Desktop Connection" | |
| disable /VirtualBox/ | |
| #---------------------------------------- | |
| #core_shortcuts | |
| #---------------------------------------- | |
| toggle "<Cmd-Shift-E>" | |
| map "<Cmd-d>" { application_previous } |
NewerOlder