public
Rubygem
Description: A helper method for loading files during test
Clone URL: git://github.com/technicalpickles/file_fixture.git
Added installing and license section. Added LICENSE file.
Sun Jul 13 17:56:01 -0700 2008
commit  28d6b5ef51940204afd254f53e8948c64b635ef4
tree    6e1fc104e15bab01476b9acc89cedd4d3e66559d
parent  09b78ebd1ff59b3c45e4c40be970036828a9440d
...
1
2
 
 
 
 
 
 
3
4
5
6
7
8
 
9
10
11
...
20
21
22
23
24
 
 
 
 
 
25
...
1
2
3
4
5
6
7
8
9
10
11
12
13
 
14
15
16
17
...
26
27
28
 
29
30
31
32
33
34
35
0
@@ -1,11 +1,17 @@
0
 # file\_fixture
0
 
0
+## Installing
0
+
0
+ gem install technicalpickles-file_fixture -s http://gems.github.com
0
+
0
+## Usage
0
+
0
 file\_fixture provide provides a convenience method for loading data from files. To use, you just add the snippet to your `test_helper.rb`:
0
 
0
     require 'file_fixture/test_unit'
0
     FileFixture::FIXTURE_DIR = File.join(File.dirname(__FILE__), "file_fixtures")
0
 
0
-Now, in your tests, you can use `file_fixture 'foo'` to read and return `file_fixtures/foo`.
0
+Place files into the `file_fixtures` directory, and then you can use `file_fixture 'foo'` to read and return `file_fixtures/foo`.
0
 
0
 If you were building wrappers around web APIs, you should use static data instead of hitting the API directly. We can use file_fixture to implement this helper method:
0
 
0
@@ -20,4 +26,8 @@ You could then use this in tests like:
0
 
0
     stubbing_http_response_with_fixture('get_tags.xml') do
0
       assert_equal 6, @user.tags.size # @user.tags does a HTTP request
0
- end
0
\ No newline at end of file
0
+ end
0
+
0
+## License
0
+
0
+See LICENSE
0
\ No newline at end of file

Comments

    No one has commented yet.