This file contains 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
import 'package:collection/collection.dart'; | |
import 'package:mobx/mobx.dart'; | |
typedef FilterPredicate<T> = bool Function(T element); | |
/// An unmodifiable but observable view of an ObservableSet. | |
/// | |
/// This just delegates reads and observations to the [sourceSet]. | |
class ObservableSetView<E> extends UnmodifiableSetView<E> implements ObservableSet<E> { | |
ObservableSetView(ObservableSet<E> sourceSet) |
This file contains 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 'spec_helper' | |
# These specs demonstrate that any_instance.should_receive().with will break subsequent specs if | |
# the message is received without the expected argument | |
describe "should_receive corruption", :focus do | |
class Foo | |
def bar(options = {}) | |
end |
This file contains 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
# The base is stolen from @gist: https://gist.github.com/gr2m/2191748, and then substantially modified. | |
beforeEach -> | |
@addMatchers | |
toBePromise: -> | |
@actual.done && [email protected] | |
toBeRejected: -> | |
@actual.state() == "rejected" | |
toBeResolved: -> | |
@actual.state() == "resolved" | |
toBeResolvedWith: -> |