Commit Graph

125 Commits

Author SHA1 Message Date
google-labs-jules[bot]
6f0d0afdb8 Fix(specs): Initialize @version_members in crops/show view spec
The `crops/show` view spec was failing with a `NoMethodError` because
the `@version_members` instance variable was `nil`. This variable is used
in the `_history` partial, which is rendered by the `show` view.

This commit fixes the spec by initializing `@version_members` to an
empty hash in the `before` block of the spec. This ensures that the
view can render without errors during the test run.
2025-12-01 02:34:46 +00:00
Daniel O'Connor
8b4f0771c5 Ruby 3.2: Rubocop - Fix Negation matcher (#3780)
* Ruby 3.2/Bundler 2.4

* Fix creation

* Upgrade to js-routes 2. Put all js routes into a global namespace.

* Remove js-routes

* Remove

* Adjust ownership

* Appease codeclimate for the nth time

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Swap to will paginate successor for bootstrap

* Update app/views/members/show.html.haml

* Update app/views/plantings/index.rss.haml

* Update .env

* Update .devcontainer/.env

* Fix spec

* Update spec

* Fix spec

* Pin to 2.4.22

* 3 space indent

* Regenerate

* Update rubocop

* Rubocop

* More rubocop

* Regenerate

* Fix Capybara/NegationMatcher
2024-07-13 15:20:11 +09:30
Daniel O'Connor
9f6fe4d7d8 Fix #3247 broken links 2023-03-13 02:00:46 +00:00
Daniel O'Connor
d1f754a288 Rubocop 2022-11-08 00:23:38 +10:30
Daniel O'Connor
b24b9f82e6 Rubocop - auto corrections 2022-11-06 16:34:36 +10:30
Brenda Wallace
43a577fa50 Update rubocop config 2021-01-05 19:46:07 +13:00
Rowan Crawford
3c8b59811b ws, is there no prettier equivalent? 2020-11-03 07:03:13 +13:00
Rowan Crawford
c889b63611 the answer is not mutating @crop 2020-11-03 07:03:13 +13:00
Brenda Wallace
d36d5ff1e3 mark test as javascript 2020-11-03 07:03:13 +13:00
Rowan Crawford
86c832d6ad ws 2020-11-03 07:03:13 +13:00
Rowan Crawford
59a693ec1f test doesn't work because don't understand how to write specs 2020-11-03 07:03:13 +13:00
Brenda Wallace
f2b385bd5e Help view spec find the correct template 2020-08-26 12:36:58 +12:00
codefactor-io
4ff95fbac9 [CodeFactor] Apply fixes 2020-01-21 22:26:08 +13:00
Brenda
7257b2ada1 Update with frozen literals 2020-01-10 16:50:52 +13:00
Brenda Wallace
04fd1a343a Rubocop update (#2334)
* Update rubocop config

* Rubocop update - for rubocop 0.77

* [CodeFactor] Apply fixes

* rubocop fixes

* [CodeFactor] Apply fixes to commit 2826c2e
2019-12-16 22:35:33 +13:00
Brenda Wallace
7b5698f977 👩‍🌾 Import openfarm data (#2177)
* Pull in openfarm icons, photos, info
* Truncating member location
* tidying up harvest display, and reducing duplication in css styles
* Tiny crop chip
* only show crop charts if there is data to show
* Make the styles more Growstuff
* Fixed links to openfarm
* Updating specs to cope with new photo sources
fix broken garden timeline on some pages
* Update homepage blurb
* Import crop companions
* More fluid page
* use thumbnail unless the source is flickr
* Messing with homepage
* Added crop growing_degree_days
* expect full size url on photos helper spec
* formatted dates from seeds#show
* tidy up places#show
* Move progress bar
* Quicker buttons for approve/reject crops
* Remove kaminari gem
* use crop cards on hierarchy page
* more crops on crops#index
* Wrap photo creation in transaction
* Wrap crop companions in a transaction
2019-09-28 17:23:25 +12:00
Brenda Wallace
c447ea03f7 Remove spec looking for old wrangle guidelines 2019-07-10 09:03:05 +00:00
Brenda Wallace
264506ef38 Move crop wrangling view test to feature spec 2019-06-26 11:16:41 +12:00
Brenda Wallace
382169b19c MAtch button label in spec 2019-06-26 11:13:21 +12:00
Awesome Code
8b0ecd568e Auto corrected by following Lint Ruby RSpec/ImplicitSubject 2019-04-17 10:37:30 +12:00
Awesome Code
ad470ede1d Auto corrected by following Lint Ruby RSpec/AlignRightLetBrace 2019-03-13 17:23:33 +13:00
Awesome Code
f90cc792bb Auto corrected by following Lint Ruby RSpec/AlignLeftLetBrace 2019-03-13 11:42:27 +13:00
Awesome Code
490db7b342 Auto corrected by following Lint Ruby RSpec/HookArgument 2019-02-11 09:00:34 +13:00
Awesome Code
bbd34c5e7b Auto corrected by following Lint Ruby RSpec/SharedContext 2019-02-10 09:24:19 +00:00
Brenda Wallace
7b01fcbd4b Align all the hashes 2018-12-30 15:22:29 +13:00
Brenda Wallace
0c78791d01 Remove unnecesary whitesapce in specs 2018-12-30 13:22:42 +13:00
Brenda Wallace
918f73d0f0 Update crop edit spec 2018-10-16 14:29:01 +13:00
Brenda Wallace
550860178e Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5 2018-09-11 16:07:30 +12:00
Awesome Code
90f4db4853 Auto corrected by following Ruby rspec layout 2018-09-10 22:20:12 +00:00
Brenda Wallace
a590b89302 Photos in spec needs to have same owner as item they link to 2018-06-04 15:29:59 +12:00
Brenda Wallace
65b4c7dbc1 Revert "Auto corrected by following Style/StringLiterals"
This reverts commit ab56a3c6b3.
2018-02-09 07:58:47 +13:00
Awesome Code
ab56a3c6b3 Auto corrected by following Style/StringLiterals 2018-02-07 10:20:26 +13:00
Brenda Wallace
b2cf022522 Removed extra blank lines 2018-01-29 13:01:49 +13:00
Awesome Code
767477df66 Auto corrected by following RSpec/LeadingSubject 2018-01-28 23:47:27 +00:00
Awesome Code
dea7ce241b Auto corrected by following RSpec/EmptyLineAfterFinalLet 2018-01-23 09:00:34 +13:00
Brenda Wallace
3cc637017d Avoid {} for multiline 2017-12-06 14:29:21 +13:00
milesgould
d8bf8ae4df De-deprecate controller and view specs
We deprecated controller and view specs on the grounds that they were
brittle, and were a poorer measure of user experience than feature
specs. However, feature specs have their own problems: they're much
slower to run, and flakier (see #901). We also ran into a few cases
where feature specs erroneously passed because they were checking for
the presence of a string that occurred in the error page!

Hence, we're cautiously un-deprecating controller and view specs.

Fixes #1132
2017-11-17 16:51:24 +00:00
Brenda Wallace
2fbba52bc8 Updating specs to use same owner for garden and planting 2017-11-13 19:18:14 +13:00
Logan Gingerich
10a8df47a9 Factorygirl to factorybot - fixes #1413 (#1425)
* FactoryGirl Changed to FactoryBot

file fix

changes based on comments received

Bundle Update on 2017-10-29

style update to align hash literal

added package-lock

* indentation fixes with rubocop

* name added to contributors
2017-11-01 15:03:31 +00:00
Brenda Wallace
6fef56ebb7 DRY the crops controller 2017-05-29 16:17:43 +12:00
Brenda Wallace
e184503caa Fix up to match rubocop's MultilineMethodCallBraceLayout recommendation 2017-02-19 16:17:03 +13:00
Brenda Wallace
723ebff923 Spacing fixes 2016-11-26 12:13:17 +13:00
Brenda Wallace
62e7c716dd Removed extra empty blank lines 2016-11-26 12:06:02 +13:00
Brenda Wallace
83392ddda1 Indentation clean ups 2016-11-26 10:51:54 +13:00
Brenda Wallace
bdb057ca0f Removed all trailing white space 2016-11-14 15:05:32 +13:00
Daniel O'Connor
0620646c6d Fix failing specs
- Updated assert_select behaviour given this is now based on nokogiri
 - Adjust some specs not to look for a specific asset name, but a behaviour
 - Adjust some specs for HTML5 style attributes instead of xhtml style
 - Fix tests that did not render before
2016-06-10 16:01:30 +09:30
Daniel O'Connor
4b4e0cf69a $ rubocop --only HashSyntax --auto-correct
483 files inspected, 2018 offenses detected, 2018 offenses corrected
2016-05-19 15:53:11 -04:00
AELOGICA
134465d023 Fixed feature errors and removed failing deprecated tests 2015-07-17 07:31:53 +08:00
AELOGICA
734b57e395 Fixed feature test errors 2015-07-17 07:31:53 +08:00
Taylor Griffin
95974ab21b add deprecation not to all controller and view specs 2015-02-12 19:52:53 +11:00