Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Just change ENV and restore it afterwards. | Federico Ravasio | 2013-10-07 | 1 | -1/+4 |
| | | | | | | | | | | | Stubbing ENV[] is not safe outside MRI. At some point after the stubbing has occurred a backtrace is printed to the ActiveSupport warning log: there Rubinius accesses ENV['RBX_NOCOLOR'] to determine if it should print the backtrace with colors or not, causing the stub to fail. Other implementations might access ENV in a different way too, we just can't predict it. The only thing we can do here is to actually set the ENV with what we want and restore it afterwards. | ||||
* | make @bitsweat happy. :heart: | Aaron Patterson | 2013-09-09 | 1 | -0/+6 |
| | |||||
* | stop using deprecated api in the tests | Aaron Patterson | 2013-09-09 | 1 | -1/+1 |
| | |||||
* | Fix fixtures regression that required table names to map to classes only, ↵ | Jeremy Kemper | 2013-09-08 | 1 | -1/+1 |
| | | | | not class names | ||||
* | auto link hm:t fixture join tables like habtm | Aaron Patterson | 2013-09-06 | 1 | -0/+35 |
| | |||||
* | Add config to method calls in fixtures. | wangjohn | 2013-08-26 | 1 | -1/+1 |
| | | | | | | | Allows you to change your configuration for calls to `table_name_prefix`, `table_name_suffix`, and `pluralize_table_names`. The default configuration is still ActiveRecord::Base, but you are now able to change the configuration easily. | ||||
* | Removing instances of string class_names in fixtures. | wangjohn | 2013-08-24 | 1 | -7/+7 |
| | | | | | | | Also, constantizing the default_fixture_model_name when it gets loaded in from the file. Later, when the class_name is passed to a new FixtureSet, a deprecation warning will occur if the class_name is a string. | ||||
* | load fixtures from linked folders | Kassio Borges | 2013-08-05 | 1 | -2/+2 |
| | |||||
* | remove deprecated `ActiveRecord::Base#connection` method. | Yves Senn | 2013-07-01 | 1 | -4/+0 |
| | |||||
* | fixture setup does not rely on `AR::Base.configurations`. | Yves Senn | 2013-06-15 | 1 | -0/+16 |
| | | | | | | | | As you can also configure your database connection using `ENV["DATABASE_URL"]`, the fixture setup can't reply on the `.configurations` Hash. As the fixtures are only loaded when ActiveRecord is actually used (`rails/test_help.rb`) it should be safe to drop the check for an existing configuration. | ||||
* | Allows setting fixture_path to a Pathname | Alexander Murmann and Can Berk Güder | 2013-03-21 | 1 | -0/+9 |
| | |||||
* | Deprecate #connection in favour of accessing it via the class | Ben Moss | 2013-03-09 | 1 | -3/+2 |
| | | | | | This allows end-users to have a `connection` method on their models without clashing with ActiveRecord internals. | ||||
* | Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by" | Guillermo Iguaran | 2013-01-18 | 1 | -3/+3 |
| | | | | | This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1. | ||||
* | User Rails 4 find_by | robertomiranda | 2013-01-18 | 1 | -3/+3 |
| | |||||
* | Rename "Fixtures" class to "FixtureSet" | Alexey Muranov | 2012-10-07 | 1 | -23/+23 |
| | | | | Rename `ActiveRecord::Fixtures` class to `ActiveRecord::FixtureSet`. Instances of this class normally hold a collection of fixtures (records) loaded either from a single YAML file, or from a file and a folder with the same name. This change make the class name singular and makes the class easier to distinguish from the modules like `ActiveRecord::TestFixtures`, which operates on multiple fixture sets, or `DelegatingFixtures`, `::Fixtures`, etc., and from the class `ActiveRecord::Fixture`, which corresponds to a single fixture. | ||||
* | remove calls to find(:first), find(:last) and find(:all) | Jon Leighton | 2012-04-26 | 1 | -1/+1 |
| | |||||
* | properly namespace the fixture exception | Aaron Patterson | 2012-03-22 | 1 | -1/+1 |
| | |||||
* | Revert PR#5001 "removed unuseful require for reply as we are not using ↵ | Vishnu Atrai | 2012-02-12 | 1 | -0/+1 |
| | | | | | | require model" This reverts commit 7381596ea32aff47222af89e4bc66000f4597acb. | ||||
* | removed unuseful require for reply as we are not using require model | Karunakar (Ruby) | 2012-02-11 | 1 | -1/+0 |
| | |||||
* | fix fixtures test as table_name is a string now | Sergey Nartimov | 2012-01-26 | 1 | -2/+2 |
| | |||||
* | create_fixtures should accept symbol keys for custom table -> class ↵ | Jeremy Kemper | 2012-01-03 | 1 | -2/+10 |
| | | | | mappings. Fixes an unintended regression. | ||||
* | setup_fixture_accessors should accept symbols for table names. Fixes an ↵ | Jeremy Kemper | 2012-01-03 | 1 | -1/+1 |
| | | | | unintended (and untested) regression. | ||||
* | Test case: fixture table name is defined in model | Alexey Muranov | 2011-12-30 | 1 | -0/+5 |
| | |||||
* | Test fixtures with custom model and table names | Alexey Muranov | 2011-12-30 | 1 | -0/+28 |
| | | | | | | Test using fixtures with random names and model names, that is not following naming conventions but using set_fixture_class instead. It is expected that the table name be defined in the model, but this is not explicitly tested here. This will need to be fixed. | ||||
* | Fix a fixtures test case with table prefix/suffix | Alexey Muranov | 2011-12-27 | 1 | -23/+37 |
| | | | | Make sure the table name of a model is reset in a test case after assigning ActiveRecord::Base.table_name_prefix and ActiveRecord::Base.table_name_suffix. | ||||
* | remove checks for encodings availability | Sergey Nartimov | 2011-12-25 | 1 | -1/+1 |
| | |||||
* | Revert "Merge pull request #4114 from ↵ | Jon Leighton | 2011-12-22 | 1 | -36/+23 |
| | | | | | | | | | alexeymuranov/my_fix_for_prefix_suffix_fixtures_test" This reverts commit f8e484d0f71114675ed04e987914d3f2815cb868, reversing changes made to fa5adfb1e884bf21a7071ade634a820e37ac4db4. Reason: broke the postgres tests. | ||||
* | Fix a fixtures test case with table prefix/suffix | Alexey Muranov | 2011-12-22 | 1 | -23/+36 |
| | | | Make sure the table name of a model is reset in a test case after assigning ActiveRecord::Base.table_name_prefix and ActiveRecord::Base.table_name_suffix. This was somebody else's test case, so an independent opinion on the change can be helpful. | ||||
* | Errno::ENOENT error makes more sense when a file cannot be found | Aaron Patterson | 2011-12-10 | 1 | -1/+1 |
| | |||||
* | Use broken YAML that will fail with Syck as well as Psych. Fixes ↵ | Jon Leighton | 2011-10-09 | 1 | -2/+2 |
| | | | | | | test_broken_yaml_exception in fixtures_test.rb on Ruby 1.8.7. Cherry-pick from 3-1-stable: b8d46924e70e0847e92e1d2dbaaec8c11381072c | ||||
* | Transactional fixtures enlist all active database connections. | Jeremy Kemper | 2011-10-05 | 1 | -3/+27 |
| | | | | You can use multiple databases in your tests without disabling transactional fixtures. | ||||
* | * Psych errors with poor yaml formatting are proxied. Fixes #2645, #2731 | Aaron Patterson | 2011-09-01 | 1 | -0/+16 |
| | |||||
* | Quote these dates to prevent intermittent test failure. Suppose local time ↵ | Jon Leighton | 2011-08-04 | 1 | -2/+2 |
| | | | | is 00:50 GMT+1. Without the quoting, the YAML parser would parse this as 00:50 UTC, into the local time of 01:50 GMT+1. Then, it would get written into the database in local time as 01:50. When it came back out the UTC date from the database and the UTC date of two weeks ago would be compared. The former would be 23:50, and the latter would be 00:50, so the two dates would differ, causing the assertion to fail. Quoting it prevents the YAML parser from getting involved. | ||||
* | Use Enumerable#with_index. We're on Ruby > 1.8.7 (part II) | Akira Matsuda | 2011-07-08 | 1 | -3/+1 |
| | |||||
* | Fix failing test because of Timezone difference. | Anil Wadghule | 2011-06-05 | 1 | -2/+2 |
| | |||||
* | removing CSV fixture support | Aaron Patterson | 2011-05-23 | 1 | -6/+0 |
| | |||||
* | deprecating CSV fixture support | Aaron Patterson | 2011-05-10 | 1 | -1/+3 |
| | |||||
* | Namespace Fixtures in ActiveRecord | Jason Noble | 2011-05-07 | 1 | -21/+21 |
| | | | [Fixes #439] | ||||
* | making sure the `create_fixtures` method works to prevent regressions | Aaron Patterson | 2011-04-29 | 1 | -0/+5 |
| | |||||
* | fixture methods can be overridden and super() is useful | Aaron Patterson | 2011-02-15 | 1 | -0/+15 |
| | |||||
* | fixing variable names, removing FixtureFile instances from test ivars | Aaron Patterson | 2011-02-15 | 1 | -6/+0 |
| | |||||
* | create_fixtures() should always return a list | Aaron Patterson | 2011-02-11 | 1 | -5/+5 |
| | |||||
* | favor composition over inheritence. use AS::OrderedHash rather than omap | Aaron Patterson | 2011-02-11 | 1 | -1/+1 |
| | |||||
* | Make serialized fixtures work again | Pratik Naik | 2010-12-29 | 1 | -1/+6 |
| | |||||
* | removing many unused variables | Aaron Patterson | 2010-11-16 | 1 | -3/+3 |
| | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -8/+8 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Raising exception if fixture file can't be found | Paul Hieromnimon | 2010-08-11 | 1 | -0/+11 |
| | |||||
* | Removed warnings when a variable is shadowed | Łukasz Strzałkowski | 2010-07-19 | 1 | -3/+3 |
| | |||||
* | prevent to run fixture accessor (e.g. test_foos for TestFoo model) as a test ↵ | Nobuhiro IMAI | 2010-05-16 | 1 | -0/+5 |
| | | | | | | | case [#2992 state:resolved] Signed-off-by: Wijnand Wiersma <wijnand@videre.net> Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Support fixtures for namespaced models [#2965 state:resolved] | Andrew White | 2010-04-25 | 1 | -1/+9 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> |