From f917757b5b93dbb24947f5886f797e62cb577290 Mon Sep 17 00:00:00 2001 From: augier <christophe@c-henry.fr> Date: Mon, 3 Aug 2015 21:32:51 +0200 Subject: [PATCH] Use entypo icons on mobile posts --- .../images/mobile/heart_mobile_grey.png | Bin 1317 -> 0 bytes app/assets/images/mobile/heart_mobile_red.png | Bin 1320 -> 0 bytes app/assets/images/mobile/reshare_mobile.png | Bin 764 -> 0 bytes .../images/mobile/reshare_mobile_active.png | Bin 761 -> 0 bytes app/assets/javascripts/mobile/mobile.js | 4 +- .../javascripts/mobile/mobile_comments.js | 6 +- app/assets/stylesheets/mobile/comments.scss | 51 +++++++++ app/assets/stylesheets/mobile/mobile.scss | 103 +----------------- app/helpers/mobile_helper.rb | 25 ++--- features/mobile/activity_stream.feature | 2 +- features/mobile/logged_out_browsing.feature | 2 +- features/mobile/not_safe_for_work.feature | 6 +- features/mobile/reactions.feature | 8 +- features/mobile/reshare.feature | 8 +- spec/helpers/mobile_helper_spec.rb | 19 ---- 15 files changed, 82 insertions(+), 152 deletions(-) delete mode 100644 app/assets/images/mobile/heart_mobile_grey.png delete mode 100644 app/assets/images/mobile/heart_mobile_red.png delete mode 100644 app/assets/images/mobile/reshare_mobile.png delete mode 100644 app/assets/images/mobile/reshare_mobile_active.png create mode 100644 app/assets/stylesheets/mobile/comments.scss delete mode 100644 spec/helpers/mobile_helper_spec.rb diff --git a/app/assets/images/mobile/heart_mobile_grey.png b/app/assets/images/mobile/heart_mobile_grey.png deleted file mode 100644 index 9e5ce387c799b31842aaafe0aa52b505fb503d3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1317 zcmV+=1={+FP)<h;3K|Lk000e1NJLTq003nG003VI1^@s6@tp|-00009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1hPp) zK~#9!>|NV+;xG_Z+`y)TI2D9#fMq*y2Z0JgDp=A%s36b*sUUV52&rI62c&|mh8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8Iv$|aTGiMu7(V)Q@R%GQF_RjW>I^7+NCsLo=F;$uC zHzYaVvW-WbkIsaUQQgt*WJp0`W@kXm2<NF-kYW(i)ituIFG8GFUuV?AIO#>AD8*0= zOkggA5F({R!~`KE7%3efCKw?>NnuP(P(p%}!jPEYghU~Q5iwB+iAD+oVxkcel@x=R zdt!v#$0Q_3^VqP#1Se2<ALGbpr_MqthGM`GBO!#4QVhk!c*n2xJBd536hkrKn1Kp+ zql_FO<VZ1yNtOS5{_y`(YJ`v^1&JwdEf=1?qEL=+;dVBsROA^*zAl&k=dnv(mP$F$ z%ebn{M$`#mp%g<g5YB90)Vz7N*T?<zvs8+qm>ly=+XCPn^GD8QuB=`_V3f?y4gchs zV#(W?@O2=ZP4vf~nqPqjttTAk#+H<tJi{t~un%7qd8TLN8TjmRCWO6Gc2qN@vY>b> b{s}MurKtU_i?V0!00000NkvXXu0mjf$vAL- diff --git a/app/assets/images/mobile/heart_mobile_red.png b/app/assets/images/mobile/heart_mobile_red.png deleted file mode 100644 index e2b5dc42b4980044bd89fdcda16985f7da83e37f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1320 zcmV+@1=sqCP)<h;3K|Lk000e1NJLTq003nG003VI1^@s6@tp|-00009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1hq*- zK~#9!>|NVc<1i2v{@{1%U`+*N8-Q#F>42mHLIrC&AQg~w5Go+9fKb7j4#MZ|539+J zIm*K?MY3k>x##HQgGWYledi%t^4aI-r}BZnH#Y<Qae-rC{3ye*IZxBIA_~L)7)K7U zdE?XmGgqYGBu07+^|)#9r>Pz*J(eL!qGbO`r09vjl{D33tjBi;_Ppyc*W*!7aMJ=2 zB<;5%1t*i}ap%!z3vieZa?t)qJ#IbPKLa1x*dJL;Xo@-E&hv!~4$JWSToRJof9u)) zJ6ro}D+RBvWy5&u3J|x)`l`!LAS1@m63YHjUDebg1(P5ov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Fv*r=GqdRgQ1rb~dLJ<QYi5E|>lnp-Wzt zN;%TYxT?%1)Cpms6hko(&TL=QynVLU$NltPD#cLD3iC|U0^kkv$BN5bS-pV3D4CyY z{>d}NlD9MA>qt0D^vAD~Ux5d$6OMCZOG-(eVU<7Fhp&P>GcfWDd=5Ah!d@wRsu@#R eP&^g?1Q-A{BqNSjK54rE0000<MNUMnLSTXb_h)(l diff --git a/app/assets/images/mobile/reshare_mobile.png b/app/assets/images/mobile/reshare_mobile.png deleted file mode 100644 index 91883ea03128cc87f3b14068551e6fdf52c09b93..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 764 zcmV<Y0t5YtP)<h;3K|Lk000e1NJLTq003kF003kN0{{R3M?7U_0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUyGf+%aMc?1w(9qEP`}@Si#K_3V^YioX z@9)&q)a&c(%*@Q=<Kx`i-1qnQ*x1<T=jXt{!2kdM98BpM0000HbW%=J|NsC0|NsC0 z|NsC0|NsC0041%NVgLXFLP<nHRCwCF+2L}lAP@y$Kt(j-=KY`c+SC}7CEDvb?9Wcy zZ;tK&F6LRG%&otkY9PjT6%di=Dj?E~6%diuS3pGisRAO6aeQQXW}yNiQf_A;BJyw* zkWxEmh#$?BiuR{kIo9CM5I0-7T}nGAh>MLNDsSfxGGYj=oi`*3vi9x#Mg{>_+RlcN z<M-9f2P6oiwsw9Yt`Sbf>4S{Is>W<cE4+HFNXH|77c)bBTK4l!9@H2sVyQ8hNV>JK zkfD3h5tFULmKuYE7;R^?)EErJ6b=%W8Uv1)^5ITHt{v{K#K0nYjDSS+7~Nojh#q6v zL~w{6WBU2WFr*OUbvywfts2Ai>#hPp^e><AK4l>g{qy=A1B2)>d~(LRkLWRW2b25A zSqv6({8lX^P54iu%f54pNbf)~%1H9{^4F59h@GBnq%c#Mk;qV5hk!_7b87^L3}2R0 z6!LXB#ULlkDFlh%cLfBZFC)pW06_Ya7zm_0i-AB+V{ni|j9cHpB_sd`It2t6qlg6T zTuMW*F?7Vkr&1Z>2&0@M;u*uWJ>obMsU6};Gr|OMtijqggXG0nYF-gujHM>>4Dxk2 z+2+E5`?S_~;tXk!-tMk8rk;ZM!%dJM@P^4R&PMbzi|Xy%gOMX!>O0(kEjf~AJL8OL z=XU;jE$hsEA%@etU!|R`xm=^4u3a!^3+Byx=)%tr?aV=*E>=MH?My?`b|xa9c4i`5 uJ9Ck>o!Q9pJ52>-Y3B;a-Kv886JP-J<Vjf59astg0000<MNUMnLSTZR-gHL* diff --git a/app/assets/images/mobile/reshare_mobile_active.png b/app/assets/images/mobile/reshare_mobile_active.png deleted file mode 100644 index 71a1feb5b77275bbf0b0678a09e56970f7f14f74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 761 zcmV<V0tWqwP)<h;3K|Lk000e1NJLTq003kF003kN0{{R3M?7U_0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBUyGf+%aMX1({eZo^*vMBWW@zd(YXSX+U zyhZ8t;@<GoozZ`@+nUJbw}{7Llgx0v;Hgoq8vp<QVi96q0000HbW%=J|NsC0|NsC0 z|NsC0|NsC0041%NVgLXFKS@MERCwCV+Ub&lFc1XbAqODW@cvJ`s3<ZCM@i4D^LI<W zYArf}ER6<3S3ca30YY5X1_(1*AY29mg!$$T5RSnBISK<p*tG@-bLS0^oiIRT3R4*% z>>2}vxu_12y6H;3Hn}h#h;JezCN0ecA;+kp4Wud=I3mo9)Q+)3K0)Bdx-=h%kE}3D zX+DsiRpuS$j#R8Qb7_)Zkfk*5h%-O}8+=`)7Nc2y_)f`K3VA{b-582US&ixl$%4cq zaz)WVD6?pRkywu>k>b?E-R^zPu#J4XTajDus$e)GW3-OZh!Zh<H(v^fbeR}nL~ghJ zZMhT*kugGKG~x#Fm)q)65Jc{>>ypt(vc)EOsq2W0Ave4TM8;?wqY+u^Rgt^YHAI$r z>lltC!~APV6d(2j9+8b5T!BX9!gH@WG?J}4EV9wqP(;RfRUHu7t~wmD)7UU%udzW$ zQgy4w#vruc*a##ZH8uc|HIghm*O5NE@e@@;rzUP9Cl;P7lR-TESvW;n{M!kM_?yBr zsz8FuYp)fe5<?(5F`joAZNIEWBXy}|JW7#NV@wlfMALBZx2dgD{kG=c#B04+bN=&P zy;7KFed?fcFZRj#3I290GABXkFn#{GDFAQEj}0#!pM`x#d>)`A%P*o~Tt6Hg0p`LK zbbdm0=A1F}oP6mxa^o;F*?4InNf;Gm90zBBtV>f1S(T<9GWy;CSxQqCd6lLvGKbMd rMo$LFy)+GwsR91)pU8d+`4eCO{1ZogqU|-w00000NkvXXu0mjfoZV8Q diff --git a/app/assets/javascripts/mobile/mobile.js b/app/assets/javascripts/mobile/mobile.js index 0a00b723b5..aeda97c76d 100644 --- a/app/assets/javascripts/mobile/mobile.js +++ b/app/assets/javascripts/mobile/mobile.js @@ -56,7 +56,7 @@ $(document).ready(function(){ }); /* Heart toggle */ - $(".like_action", ".stream").bind("tap click", function(evt){ + $(".like-action", ".stream").bind("tap click", function(evt){ evt.preventDefault(); var link = $(this), likeCounter = $(this).closest(".stream_element").find("like_count"), @@ -99,7 +99,7 @@ $(document).ready(function(){ }); /* Reshare */ - $(".reshare_action", ".stream").bind("tap click", function(evt){ + $(".reshare-action", ".stream").bind("tap click", function(evt){ evt.preventDefault(); var link = $(this), diff --git a/app/assets/javascripts/mobile/mobile_comments.js b/app/assets/javascripts/mobile/mobile_comments.js index e2c1f6673b..ed50b4d7f7 100644 --- a/app/assets/javascripts/mobile/mobile_comments.js +++ b/app/assets/javascripts/mobile/mobile_comments.js @@ -39,7 +39,7 @@ $(document).ready(function() { var bottomBar = toggleReactionsLink.closest(".bottom_bar").first(), commentsContainer = commentsContainerLazy(bottomBar), existingCommentsContainer = commentsContainer(), - commentActionLink = bottomBar.find("a.comment_action"); + commentActionLink = bottomBar.find("a.comment-action"); if (existingCommentsContainer.length > 0) { showLoadedComments(toggleReactionsLink, existingCommentsContainer, commentActionLink); } else { @@ -73,7 +73,7 @@ $(document).ready(function() { }; } - $(".stream").on("tap click", "a.comment_action", function(evt) { + $(".stream").on("tap click", "a.comment-action", function(evt) { evt.preventDefault(); showCommentBox(this); var bottomBar = $(this).closest(".bottom_bar").first(); @@ -157,7 +157,7 @@ $(document).ready(function() { function handleCommentShowing(form, bottomBar) { var formContainer = form.parent(); formContainer.remove(); - var commentActionLink = bottomBar.find("a.comment_action").first(); + var commentActionLink = bottomBar.find("a.comment-action").first(); commentActionLink.addClass("inactive"); var toggleReactionsLink = bottomBar.find(".show_comments").first(); showComments(toggleReactionsLink); diff --git a/app/assets/stylesheets/mobile/comments.scss b/app/assets/stylesheets/mobile/comments.scss new file mode 100644 index 0000000000..02aa6a6386 --- /dev/null +++ b/app/assets/stylesheets/mobile/comments.scss @@ -0,0 +1,51 @@ +.bottom_bar { + border-radius: 0 0 5px 5px; + z-index: 3; + display: block; + position: relative; + padding: 8px 10px 10px; + background: $background-grey; + margin-top: 10px; + border-top: 1px solid $border-grey; + min-height: 22px; + + > a, .show_comments { + @include transition(color); + color: $text-grey; + font-weight: bold; + } + + .show_comments { + position: relative; + top: 3px; + } + + a.show_comments.active:not(.bottom_collapse) { + color: $text; + padding-right: 14px; + background: { + image: image-url("mobile/arrow_down_small.png"); + position: center right; + repeat: no-repeat; + } + } + + .floater { + top: -5px; + float: right; + height: 28px; + overflow: hidden; + position: relative; + + [class^="entypo"] { + height: 90%; + margin: 0 4px; + color: $text-grey; + font-size: 24px; + &:hover, &:active, &:focus{ text-decoration: none; } + &:last-child { margin-right: 1px; } + &.entypo-reshare.active { color: $blue; } + &.entypo-heart.active { color: $red; } + } + } +} diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index b4e4e87a07..6462b31d02 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -11,6 +11,7 @@ @import "mobile/conversations"; @import "mobile/settings"; @import "mobile/stream_element"; +@import "mobile/comments"; a { color: #2489ce; @@ -369,87 +370,6 @@ h3 { margin-top: 0; } float: right; } -.bottom_bar { - border-radius: 0 0 5px 5px; - z-index: 3; - display: block; - position: relative; - padding: 10px; - padding-top: 8px; - background: $background-grey; - - margin: { - top: 10px; }; - - border: { - top: 1px solid $border-grey; - }; - - min-height: 22px; - - > a, - .show_comments { - @include transition(color); - color: $text-grey; - font-weight: bold; - } - - .show_comments { - position: relative; - top: 3px; - color: #ccc; - } - - a.show_comments { - color: $text-grey; - - &.active:not(.bottom_collapse) { - color: #444; - padding: { - right: 14px; - } - background: { - image: image-url("mobile/arrow_down_small.png"); - position: center right; - repeat: no-repeat; - } - } - } - - #bottom_bar_tabs { - display: table; - width: 100%; - text: { - align: center; - } - border: { - bottom: 1px solid #ccc; - } - font: { - size: 28px; - } - color: #ccc; - - .tab { - display: table-cell; - position:relative; - top: -5px; - - border: { - right: 1px solid #ccc; - } - - &:last-child { - border: none; - } - } - } -} - -.floater { - float: right; -} - .photo_area { border-radius: 3px; text-align: center; } @@ -476,27 +396,6 @@ h3 { margin-top: 0; } } } -.reshare_action { - background-image: image-url("mobile/reshare_mobile.png"); - &.active { - background-image: image-url("mobile/reshare_mobile_active.png"); - } -} - -.like_action { - background-image: image-url("mobile/heart_mobile_grey.png"); - &.active { - background-image: image-url("mobile/heart_mobile_red.png"); - } -} - -.comment_action.image_link { - background-image: image-url("mobile/pencil_mobile_grey_active.png"); - &.inactive { - background-image: image-url("mobile/pencil_mobile_grey.png"); - } -} - #new_status_message { margin: 0; diff --git a/app/helpers/mobile_helper.rb b/app/helpers/mobile_helper.rb index 470038b4a8..d64fdcee0f 100644 --- a/app/helpers/mobile_helper.rb +++ b/app/helpers/mobile_helper.rb @@ -1,41 +1,40 @@ module MobileHelper - def aspect_select_options(aspects, selected) - selected_id = selected == :all ? "" : selected.id - '<option value="" >All</option>\n'.html_safe + options_from_collection_for_select(aspects, "id", "name", selected_id) - end - def mobile_reshare_icon(post) if (post.public? || reshare?(post)) && (user_signed_in? && post.author != current_user.person) absolute_root = reshare?(post) ? post.absolute_root : post if absolute_root && absolute_root.author != current_user.person - reshare = Reshare.where(:author_id => current_user.person_id, - :root_guid => absolute_root.guid).first + reshare = Reshare.where(author_id: current_user.person_id, + root_guid: absolute_root.guid).first klass = reshare.present? ? "active" : "inactive" - link_to '', reshares_path(:root_guid => absolute_root.guid), :title => t('reshares.reshare.reshare_confirmation', :author => absolute_root.author_name), :class => "image_link reshare_action #{klass}" + link_to "", reshares_path(root_guid: absolute_root.guid), + title: t("reshares.reshare.reshare_confirmation", author: absolute_root.author_name), + class: "entypo-reshare reshare-action #{klass}" end end end def mobile_like_icon(post) if current_user && current_user.liked?(post) - link_to '', post_like_path(post.id, current_user.like_for(post).id), :class => "image_link like_action active" + link_to "", post_like_path(post.id, current_user.like_for(post).id), class: "entypo-heart like-action active" else - link_to '', post_likes_path(post.id), :class => "image_link like_action inactive" + link_to "", post_likes_path(post.id), class: "entypo-heart like-action inactive" end end def mobile_comment_icon(post) - link_to '', new_post_comment_path(post), :class => "image_link comment_action inactive" + link_to "", new_post_comment_path(post), class: "entypo-comment comment-action inactive" end def reactions_link(post) reactions_count = post.comments_count + post.likes_count if reactions_count > 0 - link_to "#{t('reactions', :count => reactions_count)}", post_comments_path(post, :format => "mobile"), :class => 'show_comments' + link_to "#{t('reactions', count: reactions_count)}", + post_comments_path(post, format: "mobile"), + class: "show_comments" else html = "<span class='show_comments'>" - html << "#{t('reactions', :count => reactions_count)}" + html << "#{t('reactions', count: reactions_count)}" html << "</span>" end end diff --git a/features/mobile/activity_stream.feature b/features/mobile/activity_stream.feature index dcb9f615a7..d63961290d 100644 --- a/features/mobile/activity_stream.feature +++ b/features/mobile/activity_stream.feature @@ -16,7 +16,7 @@ Feature: Viewing my activity on the steam mobile page And I should not see "Hello! I am #newhere" Scenario: Show post on my activity - When I click on selector "a.image_link.like_action.inactive" + When I click on selector "a.like-action.inactive" And I open the drawer And I follow "My activity" Then I should see "My activity" diff --git a/features/mobile/logged_out_browsing.feature b/features/mobile/logged_out_browsing.feature index cbab125a42..0eedca9830 100644 --- a/features/mobile/logged_out_browsing.feature +++ b/features/mobile/logged_out_browsing.feature @@ -8,7 +8,7 @@ Feature: Browsing Diaspora as a logged out user mobile Given a user named "Bob Jones" with email "bob@bob.bob" And "bob@bob.bob" has a public post with text "public stuff" And I sign in as "bob@bob.bob" - And I click on selector "a.image_link.comment_action.inactive" + And I click on selector "a.comment-action.inactive" And I fill in the following: | text | this also | And I press "Comment" diff --git a/features/mobile/not_safe_for_work.feature b/features/mobile/not_safe_for_work.feature index ad510329c1..4a4e784b2e 100644 --- a/features/mobile/not_safe_for_work.feature +++ b/features/mobile/not_safe_for_work.feature @@ -45,7 +45,7 @@ Feature: Not safe for work And I toggle all nsfw posts And I follow "Reshare" And I confirm the alert - Then I should see a "a.image_link.reshare_action.active" + Then I should see a "a.reshare-action.active" When I go to the home page Then I should not see "Sexy Senators Gone Wild!" @@ -59,7 +59,7 @@ Feature: Not safe for work And I toggle all nsfw posts And I follow "Reshare" And I confirm the alert - Then I should see a "a.image_link.reshare_action.active" + Then I should see a "a.reshare-action.active" When I go to the home page Then I should not see "Sexy Senators Gone Wild!" @@ -73,7 +73,7 @@ Feature: Not safe for work And I toggle all nsfw posts And I follow "Reshare" And I confirm the alert - Then I should see a "a.image_link.reshare_action.active" + Then I should see a "a.reshare-action.active" When I go to the home page Then I should not see "Sexy Senators Gone Wild!" diff --git a/features/mobile/reactions.feature b/features/mobile/reactions.feature index f6ff67f9d8..20e09f0dd5 100644 --- a/features/mobile/reactions.feature +++ b/features/mobile/reactions.feature @@ -16,15 +16,15 @@ Feature: reactions mobile post Scenario: like on a mobile post When I should see "No reactions" within ".show_comments" And I click on selector "span.show_comments" - And I click on selector "a.image_link.like_action.inactive" - Then I should see a "a.image_link.like_action.active" + And I click on selector "a.like-action.inactive" + Then I should see a "a.like-action.active" When I go to the stream page And I should see "1 reaction" within ".show_comments" And I click on selector "a.show_comments" Then I should see "1" within ".like_count" Scenario: comment and delete a mobile post - When I click on selector "a.image_link.comment_action.inactive" + When I click on selector "a.comment-action.inactive" And I fill in the following: | text | is that a poodle? | And I press "Comment" @@ -33,7 +33,7 @@ Feature: reactions mobile post And I should see "1 reaction" within ".show_comments" And I click on selector "a.show_comments" And I should see "1" within ".comment_count" - When I click on selector "a.image_link.comment_action" + When I click on selector "a.comment-action" And I click on selector "a.remove" And I confirm the alert Then I should not see "1 reaction" within ".show_comments" diff --git a/features/mobile/reshare.feature b/features/mobile/reshare.feature index a072b97e18..1a84b70793 100644 --- a/features/mobile/reshare.feature +++ b/features/mobile/reshare.feature @@ -16,18 +16,18 @@ Feature: resharing from the mobile And I sign in as "alice@alice.alice" Scenario: Resharing a post from a single post page - And I click on selector "a.image_link.reshare_action.inactive" + And I click on selector "a.reshare-action.inactive" And I confirm the alert - Then I should see a "a.image_link.reshare_action.active" + Then I should see a "a.reshare-action.active" When I go to the stream page Then I should see "Reshared via" within ".reshare_via" Scenario: Resharing a post from a single post page that is reshared Given the post with text "reshare this!" is reshared by "eve@eve.eve" And a user with email "alice@alice.alice" is connected with "eve@eve.eve" - And I click on the first selector "a.image_link.reshare_action.inactive" + And I click on the first selector "a.reshare-action.inactive" And I confirm the alert - Then I should see a "a.image_link.reshare_action.active" + Then I should see a "a.reshare-action.active" When I go to the stream page Then I should see "Reshared via" within ".reshare_via" diff --git a/spec/helpers/mobile_helper_spec.rb b/spec/helpers/mobile_helper_spec.rb deleted file mode 100644 index c506b3b3ce..0000000000 --- a/spec/helpers/mobile_helper_spec.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2010-2011, Diaspora Inc. This file is -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. - -require 'spec_helper' - -describe MobileHelper, :type => :helper do - - describe "#aspect_select_options" do - it "adds an all option to the list of aspects" do - # options_from_collection_for_select(@aspects, "id", "name", @aspect.id) - - n = FactoryGirl.create(:aspect) - - options = aspect_select_options([n], n).split('\n') - expect(options.first).to match(/All/) - end - end -end \ No newline at end of file -- GitLab