Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1050 Bytes
1 | module Spec |
2 | module Matchers |
3 | class AutotestMappingMatcher |
4 | def initialize(specs) |
5 | @specs = specs |
6 | end |
7 | |
8 | def to(file) |
9 | @file = file |
10 | self |
11 | end |
12 | |
13 | def matches?(autotest) |
14 | @autotest = prepare autotest |
15 | @actual = autotest.test_files_for(@file) |
16 | @actual == @specs |
17 | end |
18 | |
19 | def failure_message |
20 | "expected #{@autotest.class} to map #{@specs.inspect} to #{@file.inspect}\ngot #{@actual.inspect}" |
21 | end |
22 | |
23 | private |
24 | def prepare autotest |
25 | stub_found_files autotest |
26 | stub_find_order autotest |
27 | autotest |
28 | end |
29 | |
30 | def stub_found_files autotest |
31 | found_files = @specs.inject({}){|h,f| h[f] = Time.at(0)} |
32 | autotest.stub!(:find_files).and_return(found_files) |
33 | end |
34 | |
35 | def stub_find_order autotest |
36 | find_order = @specs.dup << @file |
37 | autotest.instance_eval { @find_order = find_order } |
38 | end |
39 | |
40 | end |
41 | |
42 | def map_specs(specs) |
43 | AutotestMappingMatcher.new(specs) |
44 | end |
45 | |
46 | end |
47 | end |