Shiny
15de4ac08c
Merge branch 'dev' into bw/active-plantings
2017-01-08 11:16:19 +13:00
Shiny
5ca8829727
Merge branch 'dev' into bw/active-plantings
2017-01-05 16:35:39 +13:00
Shiny
d40eccdb63
Merge branch 'dev' into bw/harvests-linkto-plantings
2017-01-05 16:31:22 +13:00
Shiny
fc71cba6ba
Merge branch 'dev' into bw/harvests-linkto-plantings
2017-01-04 22:52:54 +13:00
Brenda Wallace
283bb76a9e
Link a harvest to a planting, and display
2017-01-04 22:45:49 +13:00
Brenda Wallace
18e58809c3
Merge remote-tracking branch 'upstream/dev' into bw/active-plantings
2017-01-04 16:25:44 +13:00
Brenda Wallace
b27b361e2f
Show active plantings by default
2017-01-04 16:25:19 +13:00
Shiny
3fafa87afd
Merge branch 'dev' into bw/garden-specs
2017-01-04 16:18:54 +13:00
Brenda Wallace
8047aef692
Merge remote-tracking branch 'upstream/dev' into bw/descriptive-spec
...
Conflicts:
spec/features/signin_spec.rb
2017-01-03 22:16:24 +13:00
Brenda Wallace
b38728c5df
Add login() to signin spec to reduce code duplication
2017-01-03 22:13:27 +13:00
Brenda Wallace
241c3cfdc0
Moves model name into spec description
...
so we can tell which failed.
2017-01-03 22:12:23 +13:00
Brenda Wallace
ab75f830fb
Controller garden specs for member doing what they shouldn't
2016-12-25 10:38:07 +13:00
Shiny
ee7fbb9ab9
Merge branch 'dev' into bw/guard-clauses
2016-12-21 20:53:47 +13:00
Miles Gould
4b1cdc5650
Test Model.newsletter_(un)subscribe
...
I'm not very happy with this change as-is. The tests are very shallow
(they wouldn't have caught the bug @tconquest and I found in this code,
for instance), and use the deprecated `receive_message_chain` method.
From the RSpec docs:
"Chains can be arbitrarily long, which makes it quite painless to
violate the Law of Demeter in violent ways, so you should consider any
use of receive_message_chain a code smell. Even though not all code
smells indicate real problems (think fluent interfaces),
receive_message_chain still results in brittle examples. For example, if
you write allow(foo).to receive_message_chain(:bar, :baz => 37) in a
spec and then the implementation calls foo.baz.bar, the stub will not
work."
Further work needed.
2016-12-19 22:15:53 +00:00
Miles Gould
4f1c94bfb9
Fix warnings in member_spec
2016-12-19 20:44:18 +00:00
Miles Gould
70f589d59b
Replace instance vars with locals in member_spec
2016-12-19 20:33:43 +00:00
Miles Gould
f5eede6072
Improve tests for Member.interesting
2016-12-19 20:29:05 +00:00
Miles Gould
3469d6d37f
Feature test for signin via email address
2016-12-19 20:23:07 +00:00
Miles Gould
abb9acd04a
post_spec: fix warnings
...
Several "unused variable" warnings (due to replacing unused instance
variables with unused locals) and one warning about ambiguous
lack-of-brackets.
2016-12-19 16:40:05 +00:00
Miles Gould
67faa5554c
post_spec: replace instance vars with local vars
...
The @ in front of a variable makes it an instance variable of the
surrounding object. There's no point doing that for variables that are
only used in a single function, so I've made such variables in the file
post_spec.rb into function-local variables. We should do this more
generally: there are a lot of instances of this (anti?)pattern in our
test suite.
2016-12-19 16:36:46 +00:00
Miles Gould
59b86c9b0c
Replace << with string-interpolation in post_spec
2016-12-19 16:33:41 +00:00
Miles Gould
7239cf068b
Test [member name](member) mention syntax
2016-12-19 16:31:32 +00:00
Miles Gould
c23e80b56d
Test Post.recently_active
2016-12-19 16:26:17 +00:00
Miles Gould
b011fc9bae
Test Post.comment_count
2016-12-19 16:17:31 +00:00
Miles Gould
b40974d4c3
Test Crop.create_from_csv with missing parent
...
I couldn't work out how to test that the error is logged.
2016-12-19 16:15:19 +00:00
Brenda Wallace
ebae0dfad3
Merge remote-tracking branch 'upstream/dev' into bw/guard-clauses
2016-12-14 21:37:12 +00:00
Brenda Wallace
ca7868b79a
Use guard clauses
2016-12-14 21:28:35 +00:00
Daniel O'Connor
be572b9a53
Upgrade
2016-12-09 11:25:03 +10:30
Shiny
00e240c038
Merge branch 'dev' into bw/ParenthesesAsGroupedExpression
2016-12-07 10:06:50 +13:00
Brenda Wallace
464c570d99
Fixed parentheses that are interp-ed as grouped expression
2016-12-06 21:23:55 +13:00
Brenda Wallace
4c6f0fc929
Fixed AmbiguousOperator
2016-12-06 21:09:39 +13:00
Brenda Wallace
92195d51d2
Removed redundant returns
2016-12-04 21:21:35 +00:00
Shiny
bb0eb25dd3
Merge branch 'dev' into bw/useless-assignments
2016-12-02 14:04:30 +13:00
Shiny
b454132cae
Merge branch 'dev' into bw/useless-assignments
2016-12-01 12:51:13 +13:00
Brenda Wallace
cd0e287dba
removed member look up that wasn't used in spec
2016-12-01 12:50:16 +13:00
Shiny
771e6b649c
Merge branch 'dev' into photo_concern
2016-12-01 12:37:23 +13:00
Mackenzie
ba4d85538c
Merge branch 'dev' into scopify
2016-11-30 16:47:22 -05:00
Mackenzie
af3ca215a6
Merge branch 'dev' into photo_concern
2016-11-30 16:37:36 -05:00
Miles Gould
9400225f65
Return a string from display_days_before_maturity
...
Sometimes we were returning a string, and sometimes we were returning an
integer. We're only ever displaying the result, and this seems a little
more consistent.
2016-11-30 10:16:02 +00:00
Miles Gould
b0b864a5d4
Fix off-by-one bug in display_days_before_maturity
...
We were counting from DateTime.now rather than Date.current, causing us to
under-count by a day.
2016-11-30 10:16:02 +00:00
Miles Gould
77c64d5925
Test PlantingHelper.display_days_before_maturity
...
This ensures that #1079 is fixed.
2016-11-30 10:15:52 +00:00
Mackenzie Morgan
77b7969fc9
DRY up photo & model interaction
...
* move stuff in models into a concern
* create combined collection for all models that have photos
2016-11-30 00:46:58 -05:00
Brenda Wallace
a2e86b3e5e
Rails dynamic finds fixed
2016-11-30 12:21:27 +13:00
Brenda Wallace
178c181cf5
Merge remote-tracking branch 'upstream/dev' into bw/useless-assignments
...
Conflicts:
app/controllers/crops_controller.rb
app/models/crop.rb
spec/models/scientific_name_spec.rb
2016-11-30 10:32:02 +13:00
Mackenzie Morgan
72877aebaf
update test for renamed scope
2016-11-29 13:41:05 -05:00
Mackenzie Morgan
53849a26e5
merge
2016-11-29 12:11:52 -05:00
Mackenzie
391111a5bf
Merge pull request #1088 from maco/rename_scientific_name
...
rename scientific_names.scientific_name to scientific_names.name
2016-11-29 12:04:21 -05:00
Mackenzie Morgan
c93fd78aa8
Merge branch 'dev' of gitmaco:Growstuff/growstuff into scopify
2016-11-29 09:58:02 -05:00
Mackenzie Morgan
832719b01a
merge from upstream dev
2016-11-29 09:37:25 -05:00
Miles Gould
0d8cbc5bf2
Fix comment-style weirdness
...
We had an inline comment that had been split over two lines; whitespace
fixes made this look very weird.
2016-11-29 10:44:04 +00:00