Commit Graph

3498 Commits

Author SHA1 Message Date
Brenda Wallace
6bdfe5a669 Moved plantings nav bar to own file and simplified 2017-01-14 16:32:03 +13:00
Shiny
8138aa8c09 Merge branch 'dev' into bw/active-plantings 2017-01-14 15:33:28 +13:00
pozorvlak
f31342c6e0 Merge pull request #1147 from Br3nda/alpha-bundle
Bundle alphabetical order to comply with stricter rubocop.

Patch is semantically a no-op, and the static check failure is expected.
2017-01-09 12:11:45 +00:00
Brenda Wallace
87a091d694 Bundle alpha-order to comply with stricter rubocop 2017-01-08 20:50:52 +00:00
Shiny
15de4ac08c Merge branch 'dev' into bw/active-plantings 2017-01-08 11:16:19 +13:00
Shiny
48c1b4d0f9 Merge pull request #1142 from Br3nda/bw/harvests-linkto-plantings
Link a harvest to a planting, and display
2017-01-08 11:08:42 +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
pozorvlak
478fae53ab Merge pull request #1136 from Br3nda/bw/garden-specs
Controller garden specs for member doing what they shouldn't
2017-01-04 12:06:10 +00: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
pozorvlak
de60dbb9b0 Merge pull request #1140 from Br3nda/bw/descriptive-spec
descriptive spec
2017-01-03 12:12:18 +00: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
Shiny
8b3b28b9d6 Merge branch 'dev' into bw/garden-specs 2017-01-03 20:50:20 +13:00
Daniel O'Connor
5f6fc37efd Merge pull request #1138 from Br3nda/bw/garden-name-in-link
Garden's name in link
2017-01-03 13:33:59 +10:30
Brenda Wallace
881acdccc9 Shortening long garden names on a user's page 2017-01-02 20:54:22 +13:00
Brenda Wallace
3b1753d3d5 Garden's name in link 2017-01-02 20:36:25 +13:00
Brenda Wallace
ab75f830fb Controller garden specs for member doing what they shouldn't 2016-12-25 10:38:07 +13:00
Shiny
58ddeefaa3 Merge pull request #1127 from Br3nda/bw/guard-clauses
Guard clauses
2016-12-21 22:53:06 +13:00
Shiny
ee7fbb9ab9 Merge branch 'dev' into bw/guard-clauses 2016-12-21 20:53:47 +13:00
pozorvlak
cf31e53303 Merge pull request #1131 from pozorvlak/moar_tests
Improve unit test coverage for models
2016-12-20 14:22:36 +00: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
b8385afb2f Remove apparently-unused Geocodable.geocode method
We have unit tests for geocoding, but it's not being covered, so I
assume it's being shadowed by a method installed directly from Geocoder.
2016-12-19 20:14:05 +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
Shiny
ed081e7286 Merge branch 'dev' into bw/guard-clauses 2016-12-18 19:29:05 +13:00
Cesy
1b9a5bc115 Merge pull request #1129 from Br3nda/bw/ruby-upgrade-2-3-3
Upgrade to ruby 2.3.3
2016-12-17 09:59:22 +00:00
Brenda Wallace
b0dd53eb63 Upgrade to ruby 2.3.3 2016-12-17 20:32:07 +13: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
148dfa7f8b Merge pull request #1126 from CloCkWeRX/2016-12-gem-upgrades
2016 12 gem upgrades
2016-12-13 15:08:46 +10:30
Daniel O'Connor
feff2cdfd4 Upgrade rake only 2016-12-12 10:38:31 +10:30
Daniel O'Connor
74657abec0 Revert "Update rake and rubocop"
This reverts commit c9127dbf1e.
2016-12-12 10:37:45 +10:30
Daniel O'Connor
6ff3fa21e1 Revert "Disable Style/EmptyMethod for now"
This reverts commit 5235b11905.
2016-12-12 10:37:26 +10:30
Daniel O'Connor
be572b9a53 Upgrade 2016-12-09 11:25:03 +10:30
Daniel O'Connor
5235b11905 Disable Style/EmptyMethod for now 2016-12-09 11:17:54 +10:30