Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/freerange/goos-ruby
The example from "Growing Object-Oriented Software, Guided by Tests" written in Ruby
https://github.com/freerange/goos-ruby
This should have been done earlier when `Item` was introduced [1].
[1] "Stop When We've Had Eno...
f50bfb91a631fbf602b834093608f2aad59cbd26 authored over 11 years ago23deb7dd071320502a29f78a46dfd48af27ef92b authored over 11 years ago
1dcb70819eb093d958dcb90c7ca7751549512998 authored over 11 years ago
221a4971830a544fcf77a9b8930cc086e7281c9f authored over 11 years ago
In order to avoid an unnecessary Java dependency.
59e00764ca1ef2ad5fbc4d0652b947d9afff367d authored over 11 years ago1c5917d9d27f4d28b34a38b0ddf0d8895e217c57 authored over 11 years ago
> The next stage is to implement the `XMPPFailureReporter` with something that
> generates a log...
3df2d5bcc41b9c93dee61a23c29576a28c254164 authored over 11 years ago
> Now we want to return to the end-to-end test and the
> `#reports_invalid_message` method that ...
> To make this feature work, we need to pass the stop price from the user
> interface to the `Au...
> We added an `#auction_failed` method to `AuctionEventListener` while
> unit-testing `AuctionMe...
> The failure will actually occur in the `AuctionMessageTranslator` which will
> throw a runtime...
> Our product people are concerned that Southabee's On-Line has a reputation
> for occasionally ...
> The last step to finish the task is to make the `AuctionSniper` observe the
> stop price we've...
> This pushes `Item` into `SniperLauncher` which, in turn, pushes it through to
> its dependent ...
> Of course we start with a failing test. We won't go through all the cases
> here, but this exa...
> As a next step, we realize that we don't yet have anything that represents
> all our sniping a...
I suspect this was supposed to happen a while ago.
c0879c92d97bd9410e7b91b059117855871740ae authored over 11 years ago
> We return to `Main` to see where we can plug in our new
> `UserRequestListener`. The changes a...
> With the `SniperLauncher` separated out, it becomes even clearer that the
> Swing features don...
> Finally, we'd like to do something about the direct reference to the
> `SnipersTableModel` and...
> The next thing to remove from `Main` is direct references to the
> `XMPPConnection`. We can wr...
> We also write a new integration test for the expanded `XMPPAuction` to show
> that it can crea...
> From here, we can push everything to do with chat, its setup, and the use of
> the `Announcer`...
> Most of the action happens in the implementation of
> `UserRequestListener#join_auction` withi...
> To make this test pass, we fill in the request listener infrastructure in
> `MainWindow` using...
> We want to write a test for our proposed new behavior, but we can't just
> write a simple unit...
> We address this failure by adding a new panel across the top to contain the
> text field for t...
> Looking back at `AuctionSniperEndToEndTest`, it already expresses everything
> we want the app...
> Then we write more unit tests to drive out the rest of the functionality. For
> these, we're n...
> The `SnipersTableModel` needs to know about multiple items, so we add a new
> method to tell i...
> The test is failing because the Sniper is not sending a Join message for the
> second auction....
> Fixing the Failure Message.
>
> We first saw this cryptic failure message in Chapter 11. It wa...
The source :rubygems is deprecated because HTTP requests are insecure.
Please change you...
To `#sniper_state_changed`.
The book mentions this method name in a few places, but it seems to...
1b03aedaa5dac71762140faf26586d0eb136b8fc authored over 11 years ago
> The rest is similar, which means we can write a new test.
>
> Following the protocol conventio...
> As always, we start with a test. We want our new test to show that the
> application can bid f...
> Finally, we see that we have some forwarding calls that we no longer need.
> `MainWindow` just...
> Swing allows a `JTable` to query its `TableModel` for the column headers,
> which is the mecha...
> To make the user interface presentable, we need to fill in the column titles
> which, as we sa...
> The next change is to replace the switch statement which is noisy, not very
> object-oriented,...
The end-to-end tests are still failing as expected, because only the
status text is being shown,...
- Revisited 829549000749c30ce9159016a3dcc524a8d29643.
- Pass a lambda converted into a block int...
> We still have a couple of things to do before we finish this task. We start by
> removing all ...
- We remove the accessor `#set_status_text` that sets the state display string
in `SnipersTabl...
- Replace calls to `#sniper_won` and `#sniper_lost` with calls to
`#sniper_state_changed`.
- N...
bc400f59c1427ccedba678aa170ee4e088eceac5 authored over 11 years ago
I suspect this was supposed to happen a while ago, but I don't think it
is mentioned in the book.
- Introduced `SniperState` "enum" and added it as an attribute on
newly renamed `SniperShapsho...
- `SniperState` is renamed to `SniperSnapshot`.
- `Column::SNIPER_STATUS` is renamed to `Column:...
- The first step is to pass the new state parameter, which we've been
ignoring,through `MainWi...
This is still slightly divergent from the code in the book which seems
to be using a different v...
The tests are failing because the table row has no details, only status
text :-
NativeExcep...
1418f1e58d6ab63feea9c7a8e9f0150e5012d56d authored over 11 years ago"We fix this test by retrofitting a minimal JTable implementation".
As usual I have had to repl...
00cf4f8821fb7af7d886a601987bf38624945706 authored over 11 years ago
I found that I needed to provide a Hamcrest matcher to the JTableDriver
constructor, so I used t...
This first part of the section makes the end-to-end test pass.
3b78d1b78f7f6dc92a38c7af3ca8a7455052e096 authored over 11 years ago5c5d81338702c872fd5879085939be342386da11 authored over 11 years ago
- It's not possible to have *private* inner class in Ruby.
- I've continued to use the explicit ...
43682a655f4adad5544a129b836a55f52ad58e5d authored over 11 years ago
Notes :-
- I've deliberately chosen not to introduce any equivalent to Java
interfaces like S...
Shows unit test failing with unexpected invocation :-
1) Failure:
test_0003_reports_i...
- I had to pass a reference to the `ui` to the `SniperStateDisplayer`. I
don't think Ruby has ...
Now the sniper has some state.
- I couldn't resist combining the assignment of @is_winning in
...
I also tidied up the names of the end-to-end tests given that we're
using the MiniTest::Spec, we...
This test now uses Mocha state machines. The expected failure is :-
1) Failure:
test_...
Now the end-to-end test is failing, because the sniper thinks it has
lost when it has actually w...
Note that the end-to-end test is still failing since we're in the middle
of implementing the "bi...
org.jivesoftware.smack.XMPPException: conflict(409)
org/jivesoftware/smack/SASLAuthentic...
Note that since JRuby closure conversion invokes the block on invocation
of *any* method, we hav...
6dfca3427af4f9284a137d2eb869651b7e9893e4 authored over 11 years ago
9acfc4cbec018ec277e74feea414395af52ea38b authored over 11 years ago
"The block is converted to a Proc object, which is then decorated with a
java interface proxy th...
I'm not sure this is the best way of doing things, but I think it's
better than it was. The "con...
c97731b3d6562fdf349af4eb23ed0e64c1acd673 authored over 12 years ago
- Remove (currently) unused jar files.
- Split jar files into develop & deploy directories as in...
Also no need for return statement in Ruby.
79247ea10970d664804f43a547122afd505383f1 authored over 12 years ago4fb3347ab0b26807963821702bc6f3dd96047b4c authored over 12 years ago
ca253d23487c6fb33ef26943ff84a393cb5cc048 authored over 12 years ago
6ec2d9697fcf310a8875247bd9cd8c5b04ddae19 authored over 12 years ago
28d4f094bfbd16922c9ecf949856d4937384973e authored over 12 years ago
0c3258bd9a590eac3bc30758a96a14ef9a8da0fd authored over 12 years ago
I know the code is horribly ugly, but at least the walking skeleton test
is passing. I've just b...
b79f5eab0c64ebb1f3e2055a4ccca603b8453b52 authored over 12 years ago