Brenda Wallace
1dc44c9edc
Filled in the 3 pending planting specs
2017-02-07 18:29:10 +13:00
Brenda Wallace
8408fdc845
Moved popular plant plarts calculation into sql
2017-02-06 13:22:18 +13:00
Brenda Wallace
ff50ec65d0
Merge remote-tracking branch 'upstream/dev' into HEAD
2017-01-22 18:26:29 +13:00
Brenda Wallace
0fa9f54c9c
Rename member.has_role? to role?
2017-01-14 20:54:43 +13:00
Brenda Wallace
f214f608ff
Rename member.is_paid? to paid?
2017-01-14 20:51:22 +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
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
Daniel O'Connor
ce9fc85d0b
Rubocop
2016-12-09 12:04:13 +10:30
Daniel O'Connor
fef272e30f
Merge remote-tracking branch 'upstream/dev' into likeable
2016-12-09 11:42:32 +10:30
Brenda Wallace
464c570d99
Fixed parentheses that are interp-ed as grouped expression
2016-12-06 21:23:55 +13: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
Shiny
771e6b649c
Merge branch 'dev' into photo_concern
2016-12-01 12:37:23 +13: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 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
Mackenzie Morgan
fe860aa1ab
clean up some tests
2016-11-28 22:33:00 -05:00
Mackenzie Morgan
e1a2b168c9
rename scientific_names.scientific_name to scientific_names.name
...
this mirrors alternate_names.name and allows making code more DRY
2016-11-28 21:57:51 -05:00
Brenda Wallace
8763c22284
Merge remote-tracking branch 'upstream/dev' into bw/indentation-for-great-glory
...
Conflicts:
app/models/crop.rb
2016-11-29 02:33:30 +00:00
Mackenzie
0952d7d32f
Merge pull request #1078 from Br3nda/bw/garden-names-one-line
...
Limit garden names to one line
2016-11-28 09:55:16 -05:00
Brenda Wallace
9cce0e39f6
Limit garden names to one line
2016-11-27 14:52:07 +13:00
Brenda Wallace
10c20c7f91
Narrow-ed regex on wikipedia url
...
and more tests
2016-11-27 14:35:49 +13:00
Brenda Wallace
8c7fcd9d49
Fixed all useless assignments
2016-11-26 19:36:59 +13:00
Brenda Wallace
bcdd2a9167
Changed called to rails dynamic find_by
2016-11-26 15:55:38 +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
b17e4eed7d
Block indentation fixups
2016-11-26 12:02:47 +13:00
Brenda Wallace
c878baa886
Indented parameters cleanup
2016-11-26 11:41:07 +13:00
Brenda Wallace
564731667e
Fixed up all remaining hash alignment
2016-11-26 11:17:42 +13:00
Brenda Wallace
5f3dd04068
Fixed array indentation
2016-11-26 11:00:49 +13:00
Brenda Wallace
83392ddda1
Indentation clean ups
2016-11-26 10:51:54 +13:00
Brenda Wallace
2872a1c29d
Wrapped all long lines.
...
reduced rubocop's line length limit to 120
2016-11-17 22:02:18 +13:00
Brenda Wallace
6bd9bd98d9
Removed extra blank lines, & added a end of file
2016-11-16 12:52:48 +13:00
Brenda Wallace
0475954acf
Removed extra blank lines
2016-11-16 12:50:14 +13:00
Brenda Wallace
bdb057ca0f
Removed all trailing white space
2016-11-14 15:05:32 +13:00
Mackenzie Morgan
cee3d192e0
test the new order.by_member_id scope
2016-10-11 16:34:25 -04:00
Daniel O'Connor
ff47784aee
Add explicit test coverage
2016-07-21 12:21:56 +09:30